delphi:
adoquery1.sql.add('
SET NOCOUNT ON;insert 表 values(''除id列外'');select @@IDENTITY 结果');
adoquery1.open;vb:txtSQL = "SET NOCOUNT ON;insert 表 values('除id列外');select @@IDENTITY 结果"
with ar_tmp
    if .state=adstateopen then .close
    .open txtSQL,ac_tmp,adopenkeyset,adlockreadonly
end with