Re: Stored Procedures - Getting a Unique Key
Posted in 1993
Larry Ciesla writes in reply to my mail: > Jim, > > In your repoy to John Bossert in the Informix group, you said: > > > > > In a database design which we are currently building all our primary > > keys use serial values. Due to the current limitation of V5.0, which > > forgot to allow the extraction of the last serial value used on an > > insert from SQLCA, we took a different route. > > > > Could you eloborate a bit on this limitation. We currently have an > application written in 4.1 that we are thinking of porting to 5.0, that makes > extensive use of picking up the last serial value from SQLCA. Sounds like > this may not be possible without extensive modification to the code. Or were > you speaking strickly about stored procedures? > > Thanks > | Larry Ciesla - MTS | ciesla@stairs.att.com | I was a touch wide in my comment on the limitation in V5.0 :-) The limitation applies only to the Stored Procedure Language not to any front end tool that makes use of SQLCA to retrieve the last serial key inserted. The current design of SPL does not allow for complete access to the SQLCA structure only to the SQL error no, the ISAM error no and the Error Message. This problem has been accepted by Informix and my understanding is that in V6 SPL will be expanded to give full access to the SQLCA structure. Cheers - Jim -------------------------------------------------------------------- Name: Jim Gordon Internet: jgordon@ssf-sys.DHL.COM Company: DHL Systems Inc Phone: (415) 358-5911 (Work) Address: 1700 S. Amphlett Blvd. (415) 882-9728 (Home) San Mateo, CA 94402 Fax: (415) 571-6429 --------------------------------------------------------------------