Taking a serial number?
Posted in 2001
Hi, I'm developing a client aplication in DELPHI. My Primary Keys are serial and I'm developing an interface with two tables INVOICE and INVOICE_ITEMS. I want to record all at the same time, but I couldn't make this because I have not serial to relate child records. So the INFORMIX question become:.... I like to know if is it possible increment a serial value for a particular table in a store procedure? This is to reserve a number that could be used or not. For example: if table INVOICE has 100 like its last SERIAL in ID Field, and I want to jump to 102 number to reserve 101 for a later use, but all this I want to do it in one segment code, because I want to return reserved number. I Think I can't use SQLCA parameter, because several people can be update this table at same time, so I need some mechanism to warrant this. I Accept other suggestions! Thanks for yor help! Sent via Deja.com http://www.deja.com/