I'm trying to insert a record into a SQL 7 database and retrieve the unique id generated when the record is inserted. It's working but often two records are being inserted event though I'm only doing the insert once. This is causing my whole application to blow up. I'm using the following code to do the insert:<BR>Set rs1 = Server.CreateObject("ADODB.Recordset")<BR>rs1.Open "tblTime",objConn,1,3,2<BR>rs1.AddNew<BR>rs1("stat e_id") = state_id<BR>...<BR>rs1.Update<BR>id = rs1("id")<BR><BR>And have the following in an include file:<BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR>objConn .Open "dsn=xxxx;UID=xxxx;pwd=xxxx"<BR><BR>I've used this code many times and never had a problem until recently. Now almost every time I use it I have this problem.