Whats the advantage and disadvantage of Sqlexe in peoplecode?

Adv: no need to write query just want to build
dis: we cant view queries

Showing Answers 1 - 15 of 15 Answers

sagar waikar

  • Jan 12th, 2006
 

By using SQLExec function we can do the manipulation to the database. we can write insert,update,delete sql commands.But drawback while selecting the data using sqlexec, it will return only one at a time.another drawback, if the name of the records changed, then you have to make the changes in the code as the query will in the quotes inside sqlexec

arundgati

  • Jun 18th, 2006
 

SQL exec takes a trip to the server evertime used unlike the SQL obect which takes a trip to the server only once.

  Was this answer useful?  Yes

shravya

  • Jul 17th, 2006
 

Sqlexec allows us to write SQl statements in Peoplecode.Through SQLexec we can insert,update and delete.It returns one row of data.

Disad:

Eventhough select returns multiple rows sqlexec returns one row.

If w make changes to the definition,it doesn't refer the quoted string in SQLexec.We need to change it manually.

 syntax:SQlexec("select", bindvariable)

  Was this answer useful?  Yes

People User

  • Nov 13th, 2006
 

Also SQLEXEC function has one more disadvantage where it will not pick up related langauge data automatically. You have to explicitly fire two SQLEXEC's one for base langauage and one for related language by Checking %Language_User

  Was this answer useful?  Yes

Narendar Reddy

  • Apr 26th, 2007
 

Dec: It retrieves only one row of the data from the database.

  Was this answer useful?  Yes

Narendar Reddy K.

  • Apr 26th, 2007
 

If we need to retrieve more than one rows from the database, we can use SQL class instead of SqlExec...

  Was this answer useful?  Yes

amitsk_00

  • Jul 9th, 2009
 

Also, SQLExec will open a new session on database, so if anything has been updated in Comp Buffer, will not be available in that session as COMMIT might not have happened. Also, if we have selected some value in Comp Buffer and then change the same after with SQLExec, we are creating a problem with data.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions