Getting SERIAL value when inserted with 0
Posted in 1992
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Sorry if this is a FAQ. I am working on a new UI for an Informix database. I need to be able to add rows to a table with SERIAL fields and get the next available serial value. I can do an insert with 0 in the serial field but then I need to get the number that was actually used so that I can add data to other tables that reference this row. I cannot use ESQL with this interface so I can't get the value of sqlca.sqlerrd[1]. Is there any way, using SQL statements with Informix Online 4.0 to get the automatically generated Serial value back? Thanks for any help. <=================================Q=================================> Chris Evans | Internet: evans@cayman.com Technical Support, GatorMaster | Phone: 617-494-1999 Cayman Systems | FAX: 617-494-5760 26 Landsdowne Street | AppleLink: CAYMAN.TECH Cambridge MA 02139 | or evans@cayman.com@internet#