|
 |
asp_databases thread: ASP with Access 97 and 2000
Message #1 by "elizabeth mohr" <elizabeth_mohr@f...> on Thu, 26 Apr 2001 15:24:55
|
|
Hi,
I've got an ASP page that connects to a Microsoft Access database on our
web server (IIS 4.0). I originally created the page on my own pc, testing
it out on personal web server. When i saw that it worked, I transferred
the page and the database over to our shared web server which is IIS 4.0
with NT.
My problem is this. When I moved the page over, I started getting error
messages. I've determined that the page works if I'm accessing a database
built in Microsoft Access 97. But when I use the same page to access a
database built in Microsoft 2000 (which we use), it gives me this error
message:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access 97 Driver] Can't open database
'(unknown)'. It may not be a database that your application recognizes, or
the file may be corrupt.
Do you know, what specifically we need to update on the server? Or maybe
I'm on the wrong track and there's something wrong with my code. Here's
what I'm using:
<%
strQuery="SELECT * FROM Category"
strProvider = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("\web-depts\hr\access\library2000.mdb")
Set rst = Server.CreateObject("ADODB.recordset")
rst.Open strQuery, strProvider
%>
Thanks very much for your help!
Message #2 by "Tomm Matthis" <matthis@b...> on Thu, 26 Apr 2001 10:44:47 -0400
|
|
You need to change your connection string to use the Jet 4.0 driver.
Tomm
> -----Original Message-----
> From: elizabeth mohr [mailto:elizabeth_mohr@f...]
> Sent: Thursday, April 26, 2001 3:25 PM
> To: ASP Databases
> Subject: [asp_databases] ASP with Access 97 and 2000
>
>
> Hi,
>
> I've got an ASP page that connects to a Microsoft Access database on
our
> web server (IIS 4.0). I originally created the page on my own pc,
testing
> it out on personal web server. When i saw that it worked, I
transferred
> the page and the database over to our shared web server which is IIS
4.0
> with NT.
>
> My problem is this. When I moved the page over, I started getting
error
> messages. I've determined that the page works if I'm accessing a
database
> built in Microsoft Access 97. But when I use the same page to access
a
> database built in Microsoft 2000 (which we use), it gives me this
error
> message:
>
> Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>
>
> [Microsoft][ODBC Microsoft Access 97 Driver] Can't open database
> '(unknown)'. It may not be a database that your application
recognizes, or
> the file may be corrupt.
>
>
> Do you know, what specifically we need to update on the server? Or
maybe
> I'm on the wrong track and there's something wrong with my code.
Here's
> what I'm using:
>
> <%
>
> strQuery=3D"SELECT * FROM Category"
>
> strProvider =3D "DRIVER=3D{Microsoft Access Driver (*.mdb)}; DBQ=3D" &
> Server.MapPath("\web-depts\hr\access\library2000.mdb")
>
> Set rst =3D Server.CreateObject("ADODB.recordset")
> rst.Open strQuery, strProvider
>
> %>
>
> Thanks very much for your help!
Message #3 by "Puskar Adhikari" <puskar@h...> on Thu, 26 Apr 2001 10:50:03 -0400
|
|
Hi
did you update your ODBC drivers. Because Drivers for Access 97 and Access
2000 may be differnet
Thanks,
Puskar :)
>From: "elizabeth mohr" Reply-To: "ASP Databases" To: "ASP Databases"
>Subject: [asp_databases] ASP with Access 97 and 2000 Date: Thu, 26 Apr 2001
>15:24:55 Received: from [212.250.238.84] by hotmail.com (3.2) with ESMTP id
>MHotMailBCB17CB600B540043208D4FAEE5472DF0; Thu Apr 26 07:33:30 2001 From
>bounce-asp_databases-41572@p... Thu Apr 26 07:33:59 2001 X-Mailer:
>P2P web interface List-Unsubscribe: Message-Id:
>
>Hi,
>
>I've got an ASP page that connects to a Microsoft Access database on our
>web server (IIS 4.0). I originally created the page on my own pc, testing
>it out on personal web server. When i saw that it worked, I transferred the
>page and the database over to our shared web server which is IIS 4.0 with
>NT.
>
>My problem is this. When I moved the page over, I started getting error
>messages. I've determined that the page works if I'm accessing a database
>built in Microsoft Access 97. But when I use the same page to access a
>database built in Microsoft 2000 (which we use), it gives me this error
>message:
>
>Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>
>
>[Microsoft][ODBC Microsoft Access 97 Driver] Can't open database
>'(unknown)'. It may not be a database that your application recognizes, or
>the file may be corrupt.
>
>
>Do you know, what specifically we need to update on the server? Or maybe
>I'm on the wrong track and there's something wrong with my code. Here's
>what I'm using:
>
>
>
>Thanks very much for your help!
>
Message #4 by Elizabeth_Mohr@f... on Thu, 26 Apr 2001 09:06:12 -0700
|
|
I'm a beginner, so pardon me if I'm a little slow. I wasn't entirely sure
what you meant so I changed my code to this:
set objConn=Server.CreateObject("ADODB.Connection")
vConnString = "PROVIDER={Microsoft.Jet.OLEDB.4.0};"
vConnString = vConnString & "DBQ=" & Server.MapPath("
\web-depts\hr\access\testdb.mdb") & ";"
vConnString = vConnString
objConn.connectionstring = vConnString
objConn.Open
First of all, does this look right?
Secondly, when I run this code, I get the following error:
ADODB.Connection error '800a0e7a'
Provider cannot be found. It may not be properly installed.
This same error comes up whether I'm using the Access 97 or Access 2000
database.
Any thoughts on this? Really appreciate your help.
"Tomm
Matthis" To: "ASP Databases"
<matthis@b... <asp_databases@p...>
am.org> cc: (bcc: Elizabeth Mohr/HR/FCNB/Spgla)
Subject: [asp_databases] RE: ASP with Access
04/26/01 97 and 2000
07:44 AM
Please
respond to
"ASP
Databases"
You need to change your connection string to use the Jet 4.0 driver.
Tomm
> -----Original Message-----
> From: elizabeth mohr [mailto:elizabeth_mohr@f...]
> Sent: Thursday, April 26, 2001 3:25 PM
> To: ASP Databases
> Subject: [asp_databases] ASP with Access 97 and 2000
>
>
> Hi,
>
> I've got an ASP page that connects to a Microsoft Access database on our
> web server (IIS 4.0). I originally created the page on my own pc,
testing
> it out on personal web server. When i saw that it worked, I transferred
> the page and the database over to our shared web server which is IIS 4.0
> with NT.
>
> My problem is this. When I moved the page over, I started getting error
> messages. I've determined that the page works if I'm accessing a
database
> built in Microsoft Access 97. But when I use the same page to access a
> database built in Microsoft 2000 (which we use), it gives me this error
> message:
>
> Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>
>
> [Microsoft][ODBC Microsoft Access 97 Driver] Can't open database
> '(unknown)'. It may not be a database that your application recognizes,
or
> the file may be corrupt.
>
>
> Do you know, what specifically we need to update on the server? Or maybe
> I'm on the wrong track and there's something wrong with my code. Here's
> what I'm using:
>
> <%
>
> strQuery="SELECT * FROM Category"
>
> strProvider = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
> Server.MapPath("\web-depts\hr\access\library2000.mdb")
>
> Set rst = Server.CreateObject("ADODB.recordset")
> rst.Open strQuery, strProvider
>
> %>
>
> Thanks very much for your help!
Message #5 by "Peter Foti (PeterF)" <PeterF@S...> on Thu, 26 Apr 2001 12:36:23 -0400
|
|
Hi Elizabeth,
Try something like this:
' Connection string to connect to the database
strDBPath = Server.MapPath("\web-depts\hr\access\testdb.mdb")
i_cntStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
strDBPath & ";"
' Open a connection to the database
Set dConn = Server.CreateObject("ADODB.Connection")
dConn.Open i_cntStr
Also, you should make sure the server has the latest MDAC and Jet
drivers. Both are available from Microsoft's web site.
Good luck!
Pete
> -----Original Message-----
> From: Elizabeth_Mohr@f... [mailto:Elizabeth_Mohr@f...]
> Sent: Thursday, April 26, 2001 12:06 PM
> To: ASP Databases
> Subject: [asp_databases] RE: ASP with Access 97 and 2000
>
>
> I'm a beginner, so pardon me if I'm a little slow. I wasn't
> entirely sure
> what you meant so I changed my code to this:
>
> set objConn=Server.CreateObject("ADODB.Connection")
> vConnString = "PROVIDER={Microsoft.Jet.OLEDB.4.0};"
> vConnString = vConnString & "DBQ=" & Server.MapPath("
> \web-depts\hr\access\testdb.mdb") & ";"
> vConnString = vConnString
> objConn.connectionstring = vConnString
> objConn.Open
>
> First of all, does this look right?
>
> Secondly, when I run this code, I get the following error:
>
> ADODB.Connection error '800a0e7a'
> Provider cannot be found. It may not be properly installed.
>
>
>
> This same error comes up whether I'm using the Access 97 or
> Access 2000
> database.
>
>
> Any thoughts on this? Really appreciate your help.
Message #6 by "Tomm Matthis" <matthis@b...> on Thu, 26 Apr 2001 12:41:59 -0400
|
|
Try this:
vDBLocation =3D "DBQ=3D" &
Server.MapPath("\web-depts\hr\access\testdb.mdb");"
set objConn=3DServer.CreateObject("ADODB.Connection")
objConn.Provider =3D "Microsoft.Jet.OLEDB.4.0;"
objConn.CursorLocation =3D adUseClient
objConn.ConnectionString =3D "Password=3D"""";Data Source=3D" &
vDBLocation & ";Persist Security Info=3DTrue"
Hope that helps Elizabeth.
Tomm
> -----Original Message-----
> From: Elizabeth_Mohr@f... [mailto:Elizabeth_Mohr@f...]
> Sent: Thursday, April 26, 2001 12:06 PM
> To: ASP Databases
> Subject: [asp_databases] RE: ASP with Access 97 and 2000
>
>
> I'm a beginner, so pardon me if I'm a little slow. I wasn't
> entirely sure
> what you meant so I changed my code to this:
>
> set objConn=3DServer.CreateObject("ADODB.Connection")
> vConnString =3D "PROVIDER=3D{Microsoft.Jet.OLEDB.4.0};"
> vConnString =3D vConnString & "DBQ=3D" & Server.MapPath("
> \web-depts\hr\access\testdb.mdb") & ";"
> vConnString =3D vConnString
> objConn.connectionstring =3D vConnString
> objConn.Open
>
> First of all, does this look right?
>
> Secondly, when I run this code, I get the following error:
>
> ADODB.Connection error '800a0e7a'
> Provider cannot be found. It may not be properly installed.
>
>
>
> This same error comes up whether I'm using the Access 97 or Access
2000
> database.
>
>
> Any thoughts on this? Really appreciate your help.
>
>
>
>
>
>
>
> "Tomm
>
> Matthis" To: "ASP Databases"
>
> <matthis@b...
> <asp_databases@p...>
> am.org> cc: (bcc: Elizabeth
> Mohr/HR/FCNB/Spgla)
> Subject:
> [asp_databases] RE: ASP with Access
> 04/26/01 97 and 2000
>
> 07:44 AM
>
> Please
>
> respond to
>
> "ASP
>
> Databases"
>
>
>
>
>
>
>
>
> You need to change your connection string to use the Jet 4.0 driver.
>
> Tomm
>
> > -----Original Message-----
> > From: elizabeth mohr [mailto:elizabeth_mohr@f...]
> > Sent: Thursday, April 26, 2001 3:25 PM
> > To: ASP Databases
> > Subject: [asp_databases] ASP with Access 97 and 2000
> >
> >
> > Hi,
> >
> > I've got an ASP page that connects to a Microsoft Access database on
our
> > web server (IIS 4.0). I originally created the page on my own pc,
> testing
> > it out on personal web server. When i saw that it worked, I
transferred
> > the page and the database over to our shared web server which is IIS
4.0
> > with NT.
> >
> > My problem is this. When I moved the page over, I started getting
error
> > messages. I've determined that the page works if I'm accessing a
> database
> > built in Microsoft Access 97. But when I use the same page to
access a
> > database built in Microsoft 2000 (which we use), it gives me this
error
> > message:
> >
> > Microsoft OLE DB Provider for ODBC Drivers error '80004005'
> >
> >
> > [Microsoft][ODBC Microsoft Access 97 Driver] Can't open database
> > '(unknown)'. It may not be a database that your application
recognizes,
> or
> > the file may be corrupt.
> >
> >
> > Do you know, what specifically we need to update on the server?
> Or maybe
> > I'm on the wrong track and there's something wrong with my code.
Here's
> > what I'm using:
> >
> > <%
> >
> > strQuery=3D"SELECT * FROM Category"
> >
> > strProvider =3D "DRIVER=3D{Microsoft Access Driver (*.mdb)}; DBQ=3D"
&
> > Server.MapPath("\web-depts\hr\access\library2000.mdb")
> >
> > Set rst =3D Server.CreateObject("ADODB.recordset")
> > rst.Open strQuery, strProvider
> >
> > %>
> >
> > Thanks very much for your help!
>
>
Message #7 by Elizabeth_Mohr@f... on Thu, 26 Apr 2001 10:42:19 -0700
|
|
Hi,
Still getting the same error message, so I'll check with the server guys
about the mdac version.
Thanks so much for your help, I really appreciate it!
"Peter Foti
(PeterF)" To: "ASP Databases"
<PeterF@S... <asp_databases@p...>
works.com> cc: (bcc: Elizabeth Mohr/HR/FCNB/Spgla)
Subject: [asp_databases] RE: ASP with Access
04/26/01 09:36 AM 97 and 2000
Please respond to
"ASP Databases"
Hi Elizabeth,
Try something like this:
' Connection string to connect to the database
strDBPath = Server.MapPath("\web-depts\hr\access\testdb.mdb")
i_cntStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
strDBPath & ";"
' Open a connection to the database
Set dConn = Server.CreateObject("ADODB.Connection")
dConn.Open i_cntStr
Also, you should make sure the server has the latest MDAC and Jet
drivers. Both are available from Microsoft's web site.
Good luck!
Pete
> -----Original Message-----
> From: Elizabeth_Mohr@f... [mailto:Elizabeth_Mohr@f...]
> Sent: Thursday, April 26, 2001 12:06 PM
> To: ASP Databases
> Subject: [asp_databases] RE: ASP with Access 97 and 2000
>
>
> I'm a beginner, so pardon me if I'm a little slow. I wasn't
> entirely sure
> what you meant so I changed my code to this:
>
> set objConn=Server.CreateObject("ADODB.Connection")
> vConnString = "PROVIDER={Microsoft.Jet.OLEDB.4.0};"
> vConnString = vConnString & "DBQ=" & Server.MapPath("
> \web-depts\hr\access\testdb.mdb") & ";"
> vConnString = vConnString
> objConn.connectionstring = vConnString
> objConn.Open
>
> First of all, does this look right?
>
> Secondly, when I run this code, I get the following error:
>
> ADODB.Connection error '800a0e7a'
> Provider cannot be found. It may not be properly installed.
>
>
>
> This same error comes up whether I'm using the Access 97 or
> Access 2000
> database.
>
>
> Any thoughts on this? Really appreciate your help.
|
|
 |