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 > Database Server Software > Informix > DBACCESS Return Code

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-18-08, 16:14
mcrutcher mcrutcher is offline
Registered User
 
Join Date: Jun 2008
Posts: 16
DBACCESS Return Code

We're on IDS 9.21 UC5, and I run a script every 2 minutes that connects to our database and does a select out of one of the tables, then checks the return code. Periodically I am finding a return code of 255. Any ideas what this means?
Reply With Quote
  #2 (permalink)  
Old 12-19-08, 01:09
nitin_math nitin_math is offline
Registered User
 
Join Date: Nov 2004
Posts: 143
It means either you have forgot begin/commit work or may be your database is not in logging mode (buff or un-buff or ansi). See below

: finderr 255
-255 Not in transaction.

The database server cannot execute this COMMIT WORK or ROLLBACK WORK
statement because no BEGIN WORK was executed to start a transaction.
Because no transaction was started, you cannot end one. Any database
modifications that were made are now permanent; they cannot be rolled
back but do not need to be committed. Review the sequence of SQL
statements to see where the transaction should have started.

This error can occur when you open a cursor for update and have not started
a transaction yet.



Hope it helps!

Nitin
Reply With Quote
  #3 (permalink)  
Old 12-19-08, 06:26
ibm.ids ibm.ids is offline
Registered User
 
Join Date: Nov 2008
Posts: 64
It is not correct, nitin_math.
As program, dbaccess does exit() function on finish. Some convention in C programming states that programs which finish correctly returns 0. On the other hand, programs which causes errors should return less then 0.
This 255 is in fact -1 if you present it as one byte.

For "real" informix error you should parse output of sql script.

HTH
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