It would be easier if you use stored procedures, but in this case you could
get the new value by opening a new recordset sorted by ID. Some kind of
locking should be used to avoid getting the wrong ID though..
-----Original Message-----
From: esteban_torres@h... [mailto:esteban_torres@h...]
Sent: Friday, April 27, 2001 11:53 PM
To: ASP_ADO_RDS
Subject: [asp_ado_rds] get value Identity of DB at insert a register
I have tis code
MM_insertStr = "insert into dbo.XTelegamas (Name,address,...) values
('Miguel','Calle grande 1234',..)"
Set MM_insertCmd = Server.CreateObject("ADODB.Command")
MM_insertCmd.ActiveConnection = MM_xcorreo_STRING
MM_insertCmd.CommandText = MM_insertStr
MM_insertCmd.Execute
I need get te value the data base field ID autonumeric generated to insert
command.