If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Powerbuilder - problem with embedded SQL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-20-04, 01:17
kbourg kbourg is offline
Registered User
 
Join Date: Mar 2004
Location: texas
Posts: 3
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.

Any ideas?

Thanks in advance - kbourg
Reply With Quote
  #2 (permalink)  
Old 03-20-04, 12:11
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,606
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.

-PatP
Reply With Quote
  #3 (permalink)  
Old 03-20-04, 14:36
kbourg kbourg is offline
Registered User
 
Join Date: Mar 2004
Location: texas
Posts: 3
Quote:
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.

-PatP
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.

Thanks for the suggestion ...
Reply With Quote
  #4 (permalink)  
Old 03-21-04, 11:30
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,606
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!

-PatP
Reply With Quote
  #5 (permalink)  
Old 12-20-09, 10:37
pallab pallab is offline
Registered User
 
Join Date: Dec 2009
Posts: 2
Exclamation Problem with edit mask in PowerBuilder

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?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On