RE: Retrieving SERIAL identifiers in a concurrent environment
Posted in 2006
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Platform-Specific Issues
Thank you!
I would sure as Hell hope so.
When we started converting from Esqlc (on Solaris) to C++/Ado on Winblows,
we did not see any ado magic that would get the serial so we invented this
f'd up method to insert with a Guid, read it back, and update to put the
real data on top of the guid. If the column chosen to clobber is an index,
it's not so bad, but still rather sucky.
I have it on my "todo on a rainy day" list to change all that sh-- to use
DBINFO('sqlca.sqlerrd1') .
If this thing comes in HTML, don't flame me. I've gone over to full Outlook
and not sure what it is going to do at any given moment.
-----Original Message-----
From: Simmons, Keith [mailto:keith.simmons@office2office.biz]
Sent: Tuesday, January 03, 2006 1:02 PM
To: Bill; informix-list
Subject: RE: Retrieving SERIAL identifiers in a concurrent environment
Bill
Yes it is always correct! It will contain the serial of that particular
insert until the next sql command is executed by that session.
Keith
-----Original Message-----
From: Bill [mailto:laidback@finsco.com]
Sent: Monday, January 02, 2006 8:49 PM
To: informix-list
Subject: Re: Retrieving SERIAL identifiers in a concurrent environment
My concern is "is it always correct"?
Does the serial id come from that user's session in some buffer, or what?
The manual says to get sqlerrd1 "immediately" after the insert.
Hopefully that means "before another operation on the database by this
program".
Is that your understanding?
>> SELECT DBINFO('sqlca.sqlerrd1')
>> FROM systables
>> WHERE tabname = 'systables'
>
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list
****************************************************************************
******
This message is sent in strict confidence for the addressee only. It may
contain legally privileged information. The contents are not to be disclosed
to anyone other than the addressee. Unauthorised recipients are requested
to preserve this confidentiality and to advise the sender immediately of any
error in transmission.
This footnote also confirms that this email message has been swept for the
presence of computer viruses, however we cannot guarantee that this message
is free from such problems.
****************************************************************************
******
__________ NOD32 1.1350 (20060103) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
In message <mailman.69.1136343263.740.informix-list@iiug.org>, Bill
<laidback@finsco.com> writes
>Thank you!
>I would sure as Hell hope so.
>When we started converting from Esqlc (on Solaris) to C++/Ado on Winblows,
>we did not see any ado magic that would get the serial so we invented this
>f'd up method to insert with a Guid, read it back, and update to put the
>real data on top of the guid. If the column chosen to clobber is an index,
>it's not so bad, but still rather sucky.
>
>I have it on my "todo on a rainy day" list to change all that sh-- to use
>DBINFO('sqlca.sqlerrd1') .
I'd make that change sooner rather than later...
>
>If this thing comes in HTML, don't flame me. I've gone over to full Outlook
>and not sure what it is going to do at any given moment.
Why not change back?
>
>
>-----Original Message-----
>From: Simmons, Keith [mailto:keith.simmons@office2office.biz]
>Sent: Tuesday, January 03, 2006 1:02 PM
>To: Bill; informix-list
>Subject: RE: Retrieving SERIAL identifiers in a concurrent environment
>
>Bill
>
>Yes it is always correct! It will contain the serial of that particular
>insert until the next sql command is executed by that session.
>
>Keith
>
>-----Original Message-----
>From: Bill [mailto:laidback@finsco.com]
>Sent: Monday, January 02, 2006 8:49 PM
>To: informix-list
>Subject: Re: Retrieving SERIAL identifiers in a concurrent environment
>
>
>My concern is "is it always correct"?
>
>Does the serial id come from that user's session in some buffer, or what?
>
>The manual says to get sqlerrd1 "immediately" after the insert.
>
>Hopefully that means "before another operation on the database by this
>program".
>
>
>
>Is that your understanding?
>
>
>
>>> SELECT DBINFO('sqlca.sqlerrd1')
>
>>> FROM systables
>
>>> WHERE tabname = 'systables'
>
>>
>
>
>_______________________________________________
>Informix-list mailing list
>Informix-list@iiug.org
>http://www.iiug.org/mailman/listinfo/informix-list
>
>****************************************************************************
>******
>This message is sent in strict confidence for the addressee only. It may
>contain legally privileged information. The contents are not to be disclosed
>to anyone other than the addressee. Unauthorised recipients are requested
>to preserve this confidentiality and to advise the sender immediately of any
>error in transmission.
>This footnote also confirms that this email message has been swept for the
>presence of computer viruses, however we cannot guarantee that this message
>is free from such problems.
>****************************************************************************
>******
>
>__________ NOD32 1.1350 (20060103) Information __________
>
>This message was checked by NOD32 antivirus system.
>http://www.eset.com
>
>
--
Surfer!
Email to: ramwater at uk2 dot net