Using sql-server datetime2 with TADOQuery.open
问题 I want to start using datetime2 fields in SQL Server and I need to insert into the tables via ADO from Delphi XE5. I am using TADOQuery.ExecSQL to insert and everything works fine. However most of my tables have identity columns, e.g. id integer identity(1,1) not null To save round-trips to the server, I usually use Open with two commands in the query text. The first command is the insert the second command is "select scope_identity() as scope_id" so I can retrieve the newly inserted id in