Re: Getting serial value of just inserted record
Posted in 1997
I use Online 5.07. I tried it but it didn't work.
The error is:
674: Procedure (dbinfo) not found.
111: ISAM error: no record found.Is there any solution other than an upgrade?
Guillermo Labatte
labatteg@frcu.utn.edu.ar
-----Original Message-----
} Michael J. Erikson wrote:
} > AndreasSeibt wrote:
} >
} > I have to write a stored procedure which inserts a record into a table.
} > This record has a field of Type SERIAL as primary key. I need the value
of
} > the primary key directly after inserting the record for subsequent
} > processing. Is there any way to get this value?
} >
} > I use INFORMIX-Online 7.23.
}
} To get the Serial value after an insert use the following
}Define Value Integer;
}Let Value = dbinfo("sqlca.sqlerrd1");
}This will set Value to be the value of the last Serial column inserted.
}
}Hope this helps.
} Michael J. Erickson
}