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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datawindow Update() function always returning 1 with DB stored procs

Status
Not open for further replies.

wlp1

Vendor
Apr 4, 2007
1
US
Hi,

We are in the process of replacing all Dynamic SQLs in a PowerBuilder 10.5.1 application with back-end in DB2.
We have created four stored procedure each one for SELECT, UPDATE, INSERT and DELETE and set the Update property of datawindow correctly so that it will call correct stored procedure when users are modifying data. The database is in DB2 and stored procedures are written in Cobol that PowerBuilder application is calling with the help of IBM ODBC driver. The datawindow Update() function is always returning 1 even when there is a DB2 error whereas it should return -1 in such cases.

Any help in this regard will be greatly appreciated. If anyone have done anything like this before please help. This is very critical for our project otherwise we have to write a large amount of code to replace datawindow Update() function call. We vare getting correct error code when calling stored procedure as RPC call.

Thanks in advance for the help.

Sanjay
 
It appears that you are calling these stored proc using datawindow i.e. datawindow is associated to a stored procedure and datawindow is part of some application window. I am wondering, if you can check error code in dberror event of the datawindow?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top