With
MS SQL I can make one call with an Insert statement and retreive the @@Identity with ADO as follows.
l_strSQL = "SET NOCOUNT ON;INSERT INTO [Table1] ([Field1],[Field2],[Field3]) Values (<intVaLue1>,'<strValue2>','<strValue3>');SELECT @@IDENTITY AS [ID];SET NOCOUNT OFF;"
rs.Open l_strSQL, CONN, adOpenKeyset, adLockOptimistic
lngID= rs("ID"

.value
Sounds like a good idea. I think I will send this to Pervasive.
BTW, with
Pervasive 2000i SP4 I make a seperate call immedialtly after the insert is successful like this,
l_strSQL = "SELECT @@IDENTITY AS ID FROM Table1"
rs.Open l_strSQL, CONN, adOpenDynamic, adLockOptimistic, adCmdText
lngID = rs![ID].value
Thanks for all your help mirtheil. Now I just need to get the Create Table statements working.
Thanks and Good Luck!
zemp