Tom,

 

One thing to keep in mind about using SQLCODE is that the value will be set
to the result of the most recent SQL statement.  Thus, if you do an INSERT
or UPDATE and the table has a trigger that INSERTs or UPDATEs something
else, SQLCODE will be the value of *that* transaction, not the one which
initiated it.

 

Emmitt Dove

Manager, Converting Applications Development

Evergreen Packaging, Inc.

[email protected]

(203) 214-5683 m

(203) 643-8022 o

(203) 643-8086 f

[email protected]

 

From: [email protected] [mailto:[email protected]] On Behalf Of TOM HART
Sent: Thursday, May 13, 2010 19:18
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Scratch

 

It appears that the sqlcode is not reliable on the new compiler 7.6 update.
I changed the code the err var and it worked.   Now I need to go thru and
change all my codel
Tom Hart

 

  _____  

From: "[email protected]" <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Thu, May 13, 2010 9:23:31 AM
Subject: [RBASE-L] - Re: Scratch

Tom:  I can't tell you why I made this decision, but there is only
one place in all my program code all over this country going back to
2.11 days where I use the SQLCODE command.   The only place I 
use sqlcode is within a cursor:
       fetch c1 into vproductid
       if sqlcode = 100 then
           break
       endif

I never use sqlcode anywhere else for testing.   I guess I didn't
trust that the same command would "break" a sqlcode reliably 
from version to version....  But as I said, personal choice and I
can't comment on whether it's a good idea to use sqlcode or not...

Karen






First off I want to thank Razz, Rachael, and Albert for their help.  I did
get it to work right.  Now I have a question, what happened from the last 2
compiler builds.  This code I posted I have been using for at least 2 years,
at 3 locations, and on more than 10 computers and have never once had  this
happen.  Is it better to use the code you posted and/or is the sqlcode
becoming obsolete.  I am sure I have sqlcode elsewhere in my app, but
obviously employees clock in and out everyday, so it came up first.  I have
not changed the code or form at all, just re-compiled my startup file with
the newer compiler version.
Tom Hart

 

Reply via email to