O'Reilly logo

Microsoft® Access Projects with Microsoft SQL Server™ by Natascha Nicol, Ralf Albrecht

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Editing Data

To edit the data in a recordset or to add new records, several conditions must be met. On one hand, the recordset on which the query is based must return a modifiable resultset; that is, it cannot contain an aggregate function such as Max() or Sum(). On the other hand, you must open the recordset with the lock method adLockOptimistic (or adLockBatchOptimistic; see the section later in this chapter entitled “Batch Processing”). If you are not using the CurrentObject.Connection connection object, and if you are creating a connection object with the SQLOLEDB provider instead, you can also use the adLockPessimistic option. See Chapter 26, “Transactions and Locking,” for a description of the locking mechanisms.

If you want to edit the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required