Reply: In the MSSQL, in the two databases in the Access, you will get the ID value immediately after the record.

xiaoxiao2021-03-06  46

This method should be equally possible when it is more, I haven't been tested, but you should check the method of adoDB.Recordset in the MSDN's ADO, set testrs = server.createObject ("adoDB. Recordset ")" Create the object to be tested

TestRs.open "[TestTable]", conn, 1, 2 'assumes that CONN has been created, and the database has been connected

After this sentence, the data has been read into the memory. Finally, after writing the database back through the addNew and Update methods, the previously opened data is not cleared from the memory, because there is no use of the CLOSE method to turn off the database, also There is no explicitly destroyed object, so this approach is equally possible in high-concurrent environments. Everyone can go to test.

The following will explain the way MoveLast as follows (the original sheet from ADO reference manual):

Use the MoveLast method

The current record location moves to

The last record in the Recordset. The Recordset object must support bookmark or backward cursor; otherwise call the method will generate an error.

Pay attention to the key words of the key: "Current Record" and "Recordset", not the "real-time record of the database", follow the above friends, open the database with an adoDb.recordset once, as long as it is not closed Can you keep synchronizing an update of the database unlimited? ? This is obviously impossible.

转载请注明原文地址:https://www.9cbs.com/read-70921.html

New Post(0)