Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a new record with JET ADO provider. 1

Status
Not open for further replies.

Katana

Programmer
Sep 21, 1998
1
0
0
US
Is it not possible to create a new record in a recordset with the JET 3.51 ADO provider accessing an Access database? <br>
e.g.: <br>
Dim rs as ADO.Recordset<br>
Set rs = New ADO.Recordset<br>
rs.Execute 'SOME SQL QUERY'<br>
rs.AddNew<br>
<br>
When I tried something like this I get an error message stating something to the effect of "Service not provided by provider", and pressing 'Debug' highlights the 'rs.AddNew' line in the source code.
 
The recordset does not have optomistic locking and openkeyset type (I had the same problem as you). The default is read only. You must set it manually or set it as such in the command you use from the DED. I have had a problem getting DED to do server side cursors. I can do server side manually setting these propertys but not with DED. The problem with client side cursors(The default I think, and you will also have the following problem) is that addnew does not immediately give the autonumber field value. You must requery to get it. I want the DED to be set up as a server side cursors in my commands but I get errors when I try it with a server side cursor with the DED.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top