Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedure from PowerBuilder

Status
Not open for further replies.

siraj777

Programmer
Aug 22, 2002
27
IN
Hi,

I am calling a stored procedure from Powerbuilder using n_tr.procedurename(parameters). This procedure will take set of rows and does something.

Surprisingly it works fine in PowerBuilder Debug mode (process all rows called from a loop), but in runtime it blowsup after processing only 1st record.

Blowing up means the procedure is executed only the first 10 lines even though there is no condition (like if) transferring the control elsewhere.

COMMIT;
SQLCA.PROCNAME(parms)
COMMIT;

Thanks for your help in advance.
 
hi!I'd like knowing more about your sp, but here goes a tip:


If u need to create a temp table ( for reports ), i could set

sqlca.AUTOCOMMIT = true
sqlca.storeprocedure( ... )
sqlca.AUTOCOMMIT = false


Remember test sqlca.sqldbcode to retrieve the message error.

Luck!
 
COMMIT;
Do
COMMIT;
SQLCA.MoveTimelines( is_cono, is_plant,is_dept,is_oldcctr, li_rtn )
COMMIT;
i = i + 1
LOOP WHILE li_rtn > 0 and i <= 0
COMMIT;
 
The first COMMIT inside the loop and the COMMIT after the loop are logically 'not' required.

Have you tried moving the COMMIT statement into your stored procedure? Further, try applying the latest free EBF patches from Sybase.com for your version.

---
PowerObject!
-----------------------------------------
PowerBuilder / PFC Developers' Group
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top