Click to See Complete Forum and Search --> : Jet 4.0 OLEDB


Dave Kraft
08-15-2000, 11:28 AM
Hi,
I'm trying to open an Access 2000 database using Jet 4.0 OLEDB provider.
Code as follows:

Dim cn as ADODB.Connection

Set cn = new ADODB.Connection
cn.Provider="Microsoft.OLEDB.Jet.4.0"
cn.Open Server.MapPath("/Databases/transitshort.mdb")

But I get "Cannot lock file" at the cn.Open statement. I'm trying to get
away from using a DSN becase I do not have access to the web server to add a
System DSN. Any help would be appriciated.

Dave Kraft
TSR Solutions, Inc.

Dave Kraft
08-15-2000, 11:32 AM
Ack.. I need to modify my previous post..
"Dave Kraft" <dkraft@tsrnet.com> wrote in message
news:39995fb7@news.devx.com...
> Hi,
> I'm trying to open an Access 2000 database using Jet 4.0 OLEDB provider.
> Code as follows:
>
> Dim cn as ADODB.Connection
>
> Set cn = new ADODB.Connection
This should be (of course): Set cn =
Server.CreateObject("ADODB.Connection")

> cn.Provider="Microsoft.OLEDB.Jet.4.0"
> cn.Open Server.MapPath("/Databases/transitshort.mdb")
>
> But I get "Cannot lock file" at the cn.Open statement. I'm trying to get
> away from using a DSN becase I do not have access to the web server to add
a
> System DSN. Any help would be appriciated.
>
> Dave Kraft
> TSR Solutions, Inc.
>
>