Joshua said: > Add a trigger to the table on insert: > > CREATE TRIGGER mytable_insert ON dbo.mytable > FOR INSERT > AS SELECT @@identity AS id > > Then, whenever you insert a record you'll automatically get back a recordset > containing the inserted identity. > > In ASP: > Set oRS = oConn.Execute("INSERT INTO mytable...") > Response.Write "Inserted ID: " & oRS("id") Casey replied: Yes, I was thinking along the same lines. Of course, I'm using ASP.NET rather then classic ASP. After inserting the new record, I tried this: Dim doc_id as integer = cmdInsert("Identity") But got this error: BC30367: Class 'System.Data.SqlClient.SqlCommand' cannot be indexed because it has no default property. - Becoming rather frustrated.