This article applies to a Microsoft Access database (.mdb or .accdb) and to a Microsoft Access project (.adp).
For a Microsoft Access 2000 version of this article, see
The operation requested by the application is not supported by the provider.
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "Select * from TestTable", CurrentProject.Connection, _
Steps to Reproduce Behavior
- In a new Access database, create the following new table and name it TestTable:
Field Name: ID
Data Type: Autonumber
Indexed: Yes (No Duplicates)
Field Name: Name
Data Type: Text
- Open the new table in Datasheet view, and then type the following test data:
- NOTE: The sample code in this article uses Microsoft ActiveX Data Objects. For this code to run properly, you must reference the Microsoft ActiveX Data Objects 2.x Library (where 2.x is 2.1 or later.) To do so, click References on the Tools menu in the Visual Basic Editor, and make sure that the Microsoft ActiveX Data Objects 2.x Library check box is selected.
Create a module, and then type the following line in the Declarations section if it is not already there:
- Type the following procedure:
Dim rs As New ADODB.Recordset
rs.Open "Select * from TestTable", CurrentProject.Connection, adOpenKeyset
- To test this function, type the following line in the Immediate window, and then press ENTER: DelFirstRecNote that you receive the error message that is mentioned in the "Symptoms" section of this article. Also, when you check the table, you see that no records have been deleted.
ID do Artigo: 289675 - Última Revisão: 30 de out de 2008 - Revisão: 1