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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I can't do recordset addnew and recordset.update..why?

Status
Not open for further replies.

apaza

Programmer
Oct 22, 2000
1
IL
I wrote an asp application on my pws server with a connection to an access database.
I can succesfuly read the recordset but i can't addnew or update.
i also checked if hte methods(addnew and update) work on my recordset: recordset.supports(adaddnew) and i got true.
everytime i run this page i get:
ADODB.Recordset error '800a0cb3'

The operation requested by the application is not supported by the provider.

/prjectI/Lord.asp, line 28

line 28 is -addme.addnew(when addme is my recordset)
please help
apaza
 
If you just used the default cursor type and cursor location you will get a forward onlty cursor which does not support additions to the database.
This assumes taht you are using ADO.

Try the following:

Code:
set rsMyRecordset = Server.CreateObject("ADODB.Recordset")
set rsMyRecordset.ActiveConnection = cnMyConnection
rsMyRecordset.CursorType = adOpenDynamic
rsMyrecordset.Source = strSQL
rsMyRecordset.Open

The use of
Code:
myRecordset.CursorType = adOpenDynamic
allows updates and additions. The use of
Code:
adOpenKeyset
also allows additions and updates, but does not allow you to see other users additions.
James :) [sig]<p>James Culshaw<br><a href=mailto:jamesculshaw@active-data-solutions.co.uk>jamesculshaw@active-data-solutions.co.uk</a><br><a href= Active Data Solutions</a><br> [/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top