> > Thanks. Yeah, I already had that one, but it is painfully slow for > > some strange reason... The more I look at it, I think there is > > something going on with the server that is slowing it > down... Time to > > scandisk, defrag, rebuild, clean, etc... > > And load Informix. :-) > > Heh heh... just kiddin' James. > > Sorry you're having trouble. > No worries, after a rebuild (which took less time than I expected) it is down right peppy, so I guess I just need to do a better job of keeping up with regular maintenance. No the trick is to figure out if SELECT @@IDENTITY AS 'ID'; Will work correctly outside of a stored procedure or do I have to write one to insert into the main table and then record that ID and the users ID into the table of who added what and when. My concern is that if someone else writes to the database or even to that table between when I insert and then read the identity, do I get my ID or their ID? It hinges on how the work "session" from http://msdn2.microsoft.com/en-us/library/ms187342.aspx relates to separate ado commands on the same connection. Why the heck couldn't INSERT have been defined so that it could return data? E.g. If you have a table with columns a, b, c, and ID which is an identity, then: INSERT INTO table (a,b,c) VALUES (1,2,3) RETURN ID; Would produce a recordset with one column "ID" and the one entry would be the identity of the new record. If only I ran the world... --- James. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist