HOME · FORUMS · ABOUT · LINKS · CONTACT US  
ABOUT PEOPLESOFT
What is PeopleSoft?
PeopleSoft Q & A
PeopleSoft&Oracle
Who is Larry Ellison?
PeopleSoft Modules
Oracle Modules
PeopleSoft 9
Project Fusion
 
TOOLS & TRAINING
Developer Tools
Consulting Tools
PeopleSoft Training
PeopleSoft Connect
Project Management
 
CONSULTING
Consulting Firms
Consulting Reviews
 
JOBS
PeopleSoft Jobs
Immigration (H1-B's)
 
OTHER LINKS
Forums
PeopleSoft News
Interviews
PS Gossip
Your Feedback
Friends of the Planet
Editors Blog
 

PSPlanetXpress
Newsletter

Please note that all fields followed by an asterisk must be filled in.

First Name*
E-mail Address*

Your e-mail address is secure. We will only use it to send you PeopleSoft-Planet related bulletins and information.

 
 

 

  Frequently Asked Questions (FAQ's)


 

Summary:

What are the advantages and disadvantages of using bind variables in SQLExec statements?

Full Article:

Answer1

Bind variables are used to pass variables to the SQLExec statement. If you do not use bind variables you will have to hard code the values in the statement. 

For example, if you were doing your timesheet, the system knows who you are (eg; %UserID). So maybe you want to know the email address of the "%userid". How would you pull the email address back from PSOprDefn table? SQLExec("SELECT A.EMAILID FROM PSORPDEFN A WHERE A.OPRID = :1", %UserID);

Answer2

The simplest explanation I can think of would be, by using the bind variable, you eliminate the possibility of introducing bad values to the SQL you are trying to construct. By using the bind variable, you are very much aware of what value goes into it.

Answer3

Not only is it easier to use bind variables instead of concatenating the SQL yourself in code, using bind variables is a better performance option on most databases. When a statement uses bind variables instead of 'hardcoded' values, it can be stored in the DB cache and the SQL does not have to be parsed again.

Answer4

It is much better for the performance in general when you use bind variables instead of building a complete sentence and then executing it. When you use bind variables, you do not need to specify the data type of each of them. 

As for disadvantages, one could be that you have to be careful with the length of the sentences, but, in general, I have not had any problem with the bind variables.

*Questions excerpted from ITToolBox.com*

Disclaimer: Contents are not reviewed for correctness and are not endorsed or recommended by PeopleSoft-Planet.com.

 SPONSORED LINKS


 

FIVE PILLAR CLUB


PeopleSoft-Planet.com is a  FIVE Pillar member site.

read more

OPTIONS

Give us your feedback

Send us your resume

Add to your favorites

Make your home page

To recommend this site to a friend, enter their email address

and then hit button to:

BOOKSTORE


Our r
ecommended reading this month is Understanding PeopleSoft 8 by Lynn Anderson

More Books

 
 

Barebones at the lowest prices



 
Trademarks referenced on the PeopleSoft-Planet website are property of their respective owners. Comments are property of their respective posters.
PeopleSoft-Planet is brought to you by Nnigma Inc. Web site code is Copyright © 2005 by Nnigma. All Rights Reserved.