Questions That Should Be Asked More Frequently

[Previous] [Next]

Q. Since adResyncAutoIncrement is the default value for this property, does that mean that the ADO Cursor Engine issues the SELECT @@IDENTITY query after every insert? If so, if I want to ensure that I get the best possible performance and if my Recordset doesn't contain an identity field, should I set the Update Resync property to adResyncNone?

A. The ADO Cursor Engine retrieves enough metadata to determine whether your Recordset contains an identity field. If your Recordset doesn't have an identity field, the ADO Cursor Engine will not submit a SELECT @@IDENTITY query after inserting the new record into your table. In other words, the answer to both questions is no.

Q. Why don't I see the value for the identity field in the new record I just inserted into my Access database?

A. Remember, this functionality was added to version 4 of the Jet OLE DB Provider and works only with Jet 4 with Access 2000-formatted databases.



Programming ADO
Programming MicrosoftВ® ADO.NET 2.0 Core Reference
ISBN: B002ECEFQM
EAN: N/A
Year: 2000
Pages: 131
Authors: David Sceppa

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net