Unanswered: Powerbuilder - problem with embedded SQL
I am porting a production general ledger application from Informix to sql server 2000. I used Powerbuilder 8.0.4 to develop it.
The application works fine, except for some of the embedded SQL. The singleton selects work fine if they reference the default transaction object. However, if I add the 'using' clause to the select to specify the transaction object, the select fails with error 16945 - The cursor was not declared.
Microsoft's site says to upgrade to the latest version of MCAD connectivity tools. Have done this and error still there.
Originally posted by Pat Phelan
So it works fine when using SQLCA, but it burps when you try to use a different object? That smells like a PB problem to me.
Have you tried to do a complete regen of all of your PBL files? That will often "shake loose" oddball problems like this for me.
Tried your suggestion, but same result. When view the specified trans obj in the debugger, shows success code. However, SQLCA shows error and message mentioned above. Its almost like PB trying to use SQLCA regardless of 'using...' clause and takes the aforementioned clause out of context.
I'd set a breakpoint on one of the offending SQL statements. When you hit the breakpoint, note the values in both SQLCA and the other transaction (or better yet, change them to some bizzare value). Step through the offending statement, then re-examine both transaction objects.
If SQLCA changes, but the specified object does not, then I'm pretty comfortable that you've got a bug!
I am working on PowerBuilder 8.x. There is one start date and end date field with edit mask to accommodate date format. the functionality is when the user enter valid start date end date to be populated with next years value e.g. start date is 12/12/2010 end date would be 12/11/2011 in lost focus of start date. now when i enter valid start date and tab out to end date the it is showing 00/00/0000 in end date field. but when i tab out again from end date then it is showing the calculated end date value. is it possible to make the end date as 12/11/2011 instead of 00/00/0000 when i tab out from start date with valid date?