ds=sqlData.runsql("select @@identity","dealer") ds=sqlData.runsql("select scope_identity()","dealer")>I don't know what you mean by commandtype is text. Do you see from my info here that I am using commandtype text? If so, ident_current('dealer') is working for me though @@identity and scope_identity are not.