?
Solved

Access DB Provider Error

Posted on 2003-02-19
5
Medium Priority
?
357 Views
Last Modified: 2013-12-23
I am trying to connect to an access database via my asp page with vb script.

It works by using

set conn = server.createobject("ADODB.Connection")
conn.open "Driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("./fpdb/empregister.mdb")



But when i use the rs to do an insert I get this error.
I have only ever worked with Sql server and via oledb providers so dont really know what I am doing here.

ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
0
Comment
Question by:andy_booth
5 Comments
 
LVL 3

Accepted Solution

by:
jarw earned 800 total points
ID: 7989903
I've had better luck with the OLE DB providers.

Something like this might work better:
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
           "Data Source=c:\somepath\myDb.mdb;" & _
           "User Id=admin;" & _
           "Password="
 
Here's a good site on connection strings:
http://www.able-consulting.com/ADO_Conn.htm

I usually open recordsets with a keyset cursor and optimistic locking.

Hope that helps.
0
 
LVL 1

Expert Comment

by:pookytoo
ID: 7989938
This worked for me:

Dim cnDB
Dim rs2DB
     
Set cnDB = Server.CreateObject("ADODB.connection")

set rs2DB = server.CreateObject("ADODB.RecordSet")

cnDB.Open = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=c:\database\okkie.mdb"

Set rs2DB = cnDB.Execute("SELECT  distinct merk FROM [all cars]")
0
 
LVL 2

Expert Comment

by:rbagdonas
ID: 8023219
Are you trying to do a recordset.update?  Try doing a straight insert using a sql script:

Conn.Execute "insert into Blah (BlahID, Description) values(1, 'Test')"

Conn.Execute "update Blah set Description = 'Test' where BlahID = 1"

If you are trying to do an update to a recordset that you have open, you might need to change the cursorlocation, cursortype, etc.

R
0
 
LVL 1

Author Comment

by:andy_booth
ID: 8023832
JarW was first to answer.

Thanks
0
 
LVL 3

Expert Comment

by:PhiliP
ID: 8045325
What about the fact that maybe there's a problem with the database trying to create a lockfile (XXXXXmdb.lck) for your mdb. Maybe you don't have the rights to create this file and put it in the mdb's folder

PhiliP
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
Suggested Courses
Course of the Month9 days, 13 hours left to enroll

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question