dbTalk Databases Forums  

Retrieving SERIAL identifiers in a concurrent environment

comp.databases.informix comp.databases.informix


Discuss Retrieving SERIAL identifiers in a concurrent environment in the comp.databases.informix forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #11  
Old   
Clive Eisen
 
Posts: n/a

Default Re: Retrieving SERIAL identifiers in a concurrent environment - 01-02-2006 , 05:19 PM






Bill wrote:
Quote:
My concern is "is it always correct"?
Yes


Does the serial id come from that user's session in some buffer, or what?
It comes from the user session

Quote:
The manual says to get sqlerrd1 "immediately" after the insert.
It means before that session does anything else to alter the structure

Hopefully that means "before another operation on the database by this
program".

Quite
--
Clive


Reply With Quote
  #12  
Old   
Simmons, Keith
 
Posts: n/a

Default RE: Retrieving SERIAL identifiers in a concurrent environment - 01-03-2006 , 02:02 PM






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 (AT) finsco (DOT) 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?



Quote:
SELECT DBINFO('sqlca.sqlerrd1')

FROM systables

WHERE tabname = 'systables'



_______________________________________________
Informix-list mailing list
Informix-list (AT) iiug (DOT) 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.
************************************************** ********************************



Reply With Quote
  #13  
Old   
Bill
 
Posts: n/a

Default RE: Retrieving SERIAL identifiers in a concurrent environment - 01-03-2006 , 09:52 PM



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 (AT) office2office (DOT) 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 (AT) finsco (DOT) 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?



Quote:
SELECT DBINFO('sqlca.sqlerrd1')

FROM systables

WHERE tabname = 'systables'



_______________________________________________
Informix-list mailing list
Informix-list (AT) iiug (DOT) 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




Reply With Quote
  #14  
Old   
Surfer!
 
Posts: n/a

Default Re: Retrieving SERIAL identifiers in a concurrent environment - 01-04-2006 , 03:43 AM



In message <mailman.69.1136343263.740.informix-list (AT) iiug (DOT) org>, Bill
<laidback (AT) finsco (DOT) com> writes
Quote:
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...

Quote:
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?

Quote:

-----Original Message-----
From: Simmons, Keith [mailto:keith.simmons (AT) office2office (DOT) 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 (AT) finsco (DOT) 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 (AT) iiug (DOT) 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


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.