?
Solved

Access DB Provider Error

Posted on 2003-02-19
5
Medium Priority
?
356 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

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

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
Suggested Courses
Course of the Month10 days, 14 hours left to enroll

770 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