Connecting to Access via ASP - ADO/ODBC 
Author Message
 Connecting to Access via ASP - ADO/ODBC

HI,

I'm hoping someone out there can help me with my problem of
successfully connecting to my Access DB using an Active Server Page
(Vbscript)and using the ADO commands and the ODBC driver.  I use the
following code:

    Set DataConn = Server.CreateObject("ADODB.Connection")
    DataConn.Open  "RealEstate","admin","fsc"

and get the following message:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database
engine cannot open the file '(unknown)'. It is already opened
exclusively by another user, or you need permission to view its data.
/beta/scripts/ReportRequest2.asp, line 11

the database is not open by anyone.   Any ideas???

Thanks,
Debra



Wed, 30 Jun 2004 02:45:13 GMT  
 Connecting to Access via ASP - ADO/ODBC
Shouldn't it be

DataConn.Open "DSN=RealEstate"

make sure you close the connection after processing

Kris


Quote:
> HI,

> I'm hoping someone out there can help me with my problem of
> successfully connecting to my Access DB using an Active Server Page
> (Vbscript)and using the ADO commands and the ODBC driver.  I use the
> following code:

>     Set DataConn = Server.CreateObject("ADODB.Connection")
>     DataConn.Open  "RealEstate","admin","fsc"

> and get the following message:

> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
> [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database
> engine cannot open the file '(unknown)'. It is already opened
> exclusively by another user, or you need permission to view its data.
> /beta/scripts/ReportRequest2.asp, line 11

> the database is not open by anyone.   Any ideas???

> Thanks,
> Debra



Wed, 30 Jun 2004 14:36:40 GMT  
 Connecting to Access via ASP - ADO/ODBC
File "unknown" is a clue that there is something wrong with the location of the
database or DSN.  Perhaps try something like this:

Set DataConn = Server.CreateObject("ADODB.Connection")
DataConn.Open "dsn=realestate"

Or if you're not using a DSN:
Set DataConn = Server.CreateObject("ADODB.Connection")DataConn.Open
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Server.MapPath("/mydbdir/realestate.mdb.") & ";

Best regards,
-Paul
Web Database Developer
http://www.Bullschmidt.com

Quote:
>HI,

>I'm hoping someone out there can help me with my problem of
>successfully connecting to my Access DB using an Active Server Page
>(Vbscript)and using the ADO commands and the ODBC driver.  I use the
>following code:

>    Set DataConn = Server.CreateObject("ADODB.Connection")
>    DataConn.Open  "RealEstate","admin","fsc"

>and get the following message:

>Error Type:
>Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
>[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database
>engine cannot open the file '(unknown)'. It is already opened
>exclusively by another user, or you need permission to view its data.
>/beta/scripts/ReportRequest2.asp, line 11

>the database is not open by anyone.   Any ideas???

>Thanks,
>Debra



Fri, 02 Jul 2004 14:58:08 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Access Query with multiple params via ASP using ADO

2. Accessing MSysObjects via ASP and ADO

3. ADO vs DAO for Access Queries via ASP

4. Passing a parameter to access via ADO and ASP

5. ADO vs DAO for Access Queries via ASP

6. How to connect to Access via ADO?

7. using access queries via ado or odbc

8. query to access via ODBC (ADO)

9. using access queries via ado or odbc

10. Connecting with ODBC via code but still get ODBC prompt for password


 
Powered by phpBB® Forum Software © phpBB Group