|
-
Apr 4th, 2000, 04:08 PM
#1
Thread Starter
New Member
Hi,
I have just started off with ADO, Database programming and I am already facing a problem I cant seem to solve.
Here is the code I have written:
Dim db As New ADODB.Connection
db.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\Inetpub\Wwwroot\Tutorial\guestbook.mdb;"
Dim rec As New ADODB.Recordset
rec.Open "Guest", db
rec.AddNew
The problem is that the 'rec.AddNew' statement gives the following error.
"The operation requested by the application is not supported by the provider"
ASP scripts that Insert data to a database dont work either.
But reading from a database works just fine.
[ Please help me solve this problem.I have spent about 3 days breaking my head over it. :-( ]
Thanx. :-)
Abid
-
Apr 4th, 2000, 08:16 PM
#2
Fanatic Member
Try something along the lines of
Code:
Set rs = New adodb.Recordset
rs.CursorType = adOpenKeyset
rs.LockType = adLockOptimistic
rs.Open "Guest", db, , , adCmdTable
rs.AddNew
I may be wrong but I think if you don't specify how to open the recordset it defaults to foward only, which does not allow updates.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|