|
 |
asp_databases thread: Connecting to Access 97 via ASP
Message #1 by "Paul Johnson" <Paul.Johnson@b...> on Mon, 18 Mar 2002 21:09:20
|
|
I'm a beginner with ASP and I'm having a problem connecting to a small
Access 97 database which resides on my hard drive (C:\). I'm running
Windows 2000 on my PC, with IIS. I getting the following error message:
Microsoft JET Database Engine error '80004005'
'C:\Access_Databases\NBA.mdb' is not a valid path. Make sure that the path
name is spelled correctly and that you are connected to the server on
which the file resides.
Here is my ASP code thats generating that error:
<HTML>
<HEAD>
<TITLE>East All-Stars</TITLE>
</HEAD>
<BODY>
<%
Dim DB
Set DB = Server.CreateObject ("ADODB.Connection")
DB.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Access_Databases\NBA.mdb;User ID=;Password=;")
Dim RS
Set RS = Server.CreateObject ("ADODB.Recordset")
RS.Open "SELECT * FROM East-AllStars", DB
If RS.EOF And RS.BOF Then
Response.Write "There are 0 records."
Else
RS.MoveFirst
While Not RS.EOF
Response.Write RS.Fields ("FirstName")
Response.Write RS.Fields ("LastName")
Response.Write RS.Fields ("Team")
Response.Write RS.Fields ("Position")
Response.Write "<HR>"
RS.MoveNext
Wend
End If
%>
</BODY>
</HTML>
Can someone please point me in the right direction, I'd really appreciate
it.
Thanks,
Paul
Message #2 by "Drew, Ron" <RDrew@B...> on Mon, 18 Mar 2002 18:54:19 -0500
|
|
Is Access_Databases directory under the INetPub/wwwroot??
-----Original Message-----
From: Paul Johnson [mailto:Paul.Johnson@b...]
Sent: Monday, March 18, 2002 4:09 PM
To: ASP Databases
Subject: [asp_databases] Connecting to Access 97 via ASP
I'm a beginner with ASP and I'm having a problem connecting to a small
Access 97 database which resides on my hard drive (C:\). I'm running
Windows 2000 on my PC, with IIS. I getting the following error message:
Microsoft JET Database Engine error '80004005'
'C:\Access_Databases\NBA.mdb' is not a valid path. Make sure that the
path
name is spelled correctly and that you are connected to the server on
which the file resides.
Here is my ASP code thats generating that error:
<HTML>
<HEAD>
<TITLE>East All-Stars</TITLE>
</HEAD>
<BODY>
<%
Dim DB
Set DB =3D Server.CreateObject ("ADODB.Connection")
DB.Open ("Provider=3DMicrosoft.Jet.OLEDB.4.0;Data
Source=3DC:\Access_Databases\NBA.mdb;User ID=3D;Password=3D;")
Dim RS
Set RS =3D Server.CreateObject ("ADODB.Recordset")
RS.Open "SELECT * FROM East-AllStars", DB
If RS.EOF And RS.BOF Then
Response.Write "There are 0 records."
Else
RS.MoveFirst
While Not RS.EOF
Response.Write RS.Fields ("FirstName")
Response.Write RS.Fields ("LastName")
Response.Write RS.Fields ("Team")
Response.Write RS.Fields ("Position")
Response.Write "<HR>"
RS.MoveNext
Wend
End If
%>
</BODY>
</HTML>
Can someone please point me in the right direction, I'd really
appreciate
it.
Thanks,
Paul
Message #3 by arshad siddiqui <ash_arshad@y...> on Mon, 18 Mar 2002 20:44:54 -0800 (PST)
|
|
Hi,
Try this one,This might work.If still it does not work
then try by copying your database in you web
directory.
DB.Open "DBQ=" &
Server.Mappath("C:\Access_Databases\NBA.mdb ") &
";Driver={Microsoft Access Driver (*.mdb)};"
--Arshad-
--- Paul Johnson <Paul.Johnson@b...> wrote:
> I'm a beginner with ASP and I'm having a problem
> connecting to a small
> Access 97 database which resides on my hard drive
> (C:\). I'm running
> Windows 2000 on my PC, with IIS. I getting the
> following error message:
>
> Microsoft JET Database Engine error '80004005'
>
> 'C:\Access_Databases\NBA.mdb' is not a valid path.
> Make sure that the path
> name is spelled correctly and that you are connected
> to the server on
> which the file resides.
>
>
>
> Here is my ASP code thats generating that error:
>
> <HTML>
> <HEAD>
> <TITLE>East All-Stars</TITLE>
> </HEAD>
> <BODY>
> <%
> Dim DB
> Set DB = Server.CreateObject ("ADODB.Connection")
> DB.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=C:\Access_Databases\NBA.mdb;User
> ID=;Password=;")
>
> Dim RS
> Set RS = Server.CreateObject ("ADODB.Recordset")
> RS.Open "SELECT * FROM East-AllStars", DB
>
> If RS.EOF And RS.BOF Then
> Response.Write "There are 0 records."
> Else
> RS.MoveFirst
> While Not RS.EOF
> Response.Write RS.Fields ("FirstName")
> Response.Write RS.Fields ("LastName")
> Response.Write RS.Fields ("Team")
> Response.Write RS.Fields ("Position")
> Response.Write "<HR>"
> RS.MoveNext
> Wend
> End If
> %>
> </BODY>
> </HTML>
>
>
> Can someone please point me in the right direction,
> I'd really appreciate
> it.
>
> Thanks,
>
> Paul
>
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/
Message #4 by "Paul Johnson" <Paul.Johnson@b...> on Tue, 19 Mar 2002 15:54:42
|
|
No, Access_Databases resides on the root of my C:\ Drive. I'll create a
directory under INetPub\wwwroot and give that a try.
Thanks for the Help!
> Is Access_Databases directory under the INetPub/wwwroot??
-----Original Message-----
From: Paul Johnson [mailto:Paul.Johnson@b...]
Sent: Monday, March 18, 2002 4:09 PM
To: ASP Databases
Subject: [asp_databases] Connecting to Access 97 via ASP
I'm a beginner with ASP and I'm having a problem connecting to a small
Access 97 database which resides on my hard drive (C:\). I'm running
Windows 2000 on my PC, with IIS. I getting the following error message:
Microsoft JET Database Engine error '80004005'
'C:\Access_Databases\NBA.mdb' is not a valid path. Make sure that the
path
name is spelled correctly and that you are connected to the server on
which the file resides.
Here is my ASP code thats generating that error:
<HTML>
<HEAD>
<TITLE>East All-Stars</TITLE>
</HEAD>
<BODY>
<%
Dim DB
Set DB =3D Server.CreateObject ("ADODB.Connection")
DB.Open ("Provider=3DMicrosoft.Jet.OLEDB.4.0;Data
Source=3DC:\Access_Databases\NBA.mdb;User ID=3D;Password=3D;")
Dim RS
Set RS =3D Server.CreateObject ("ADODB.Recordset")
RS.Open "SELECT * FROM East-AllStars", DB
If RS.EOF And RS.BOF Then
Response.Write "There are 0 records."
Else
RS.MoveFirst
While Not RS.EOF
Response.Write RS.Fields ("FirstName")
Response.Write RS.Fields ("LastName")
Response.Write RS.Fields ("Team")
Response.Write RS.Fields ("Position")
Response.Write "<HR>"
RS.MoveNext
Wend
End If
%>
</BODY>
</HTML>
Can someone please point me in the right direction, I'd really
appreciate
it.
Thanks,
Paul
Message #5 by "Paul Johnson" <Paul.Johnson@b...> on Tue, 19 Mar 2002 16:45:25
|
|
Thanks for the help Arshad, I've tried both things and I'm still getting
the same error. My other simple ASP pages open fine, however they aren't
trying to connect to a database. I'm only getting this error when I try
to connect to the Access 97 database.
Thanks again,
Paul
> Hi,
Try this one,This might work.If still it does not work
then try by copying your database in you web
directory.
DB.Open "DBQ=" &
Server.Mappath("C:\Access_Databases\NBA.mdb ") &
";Driver={Microsoft Access Driver (*.mdb)};"
--Arshad-
--- Paul Johnson <Paul.Johnson@b...> wrote:
> I'm a beginner with ASP and I'm having a problem
> connecting to a small
> Access 97 database which resides on my hard drive
> (C:\). I'm running
> Windows 2000 on my PC, with IIS. I getting the
> following error message:
>
> Microsoft JET Database Engine error '80004005'
>
> 'C:\Access_Databases\NBA.mdb' is not a valid path.
> Make sure that the path
> name is spelled correctly and that you are connected
> to the server on
> which the file resides.
>
>
>
> Here is my ASP code thats generating that error:
>
> <HTML>
> <HEAD>
> <TITLE>East All-Stars</TITLE>
> </HEAD>
> <BODY>
> <%
> Dim DB
> Set DB = Server.CreateObject ("ADODB.Connection")
> DB.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=C:\Access_Databases\NBA.mdb;User
> ID=;Password=;")
>
> Dim RS
> Set RS = Server.CreateObject ("ADODB.Recordset")
> RS.Open "SELECT * FROM East-AllStars", DB
>
> If RS.EOF And RS.BOF Then
> Response.Write "There are 0 records."
> Else
> RS.MoveFirst
> While Not RS.EOF
> Response.Write RS.Fields ("FirstName")
> Response.Write RS.Fields ("LastName")
> Response.Write RS.Fields ("Team")
> Response.Write RS.Fields ("Position")
> Response.Write "<HR>"
> RS.MoveNext
> Wend
> End If
> %>
> </BODY>
> </HTML>
>
>
> Can someone please point me in the right direction,
> I'd really appreciate
> it.
>
> Thanks,
>
> Paul
>
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/
Message #6 by "Peter Foti (PeterF)" <PeterF@S...> on Tue, 19 Mar 2002 11:46:55 -0500
|
|
Did you try putting the database in your wwwroot folder (not inetpub)?
Also, can you use Jet 4 with Access 97? I thought maybe you had to use
3.51 instead of 4.0.
Pete
> -----Original Message-----
> From: Paul Johnson [mailto:Paul.Johnson@b...]
> Sent: Tuesday, March 19, 2002 4:45 PM
> To: ASP Databases
> Subject: [asp_databases] Re: Connecting to Access 97 via ASP
>
>
> Thanks for the help Arshad, I've tried both things and I'm
> still getting
> the same error. My other simple ASP pages open fine, however
> they aren't
> trying to connect to a database. I'm only getting this error
> when I try
> to connect to the Access 97 database.
>
> Thanks again,
>
> Paul
>
> > Hi,
> Try this one,This might work.If still it does not work
> then try by copying your database in you web
> directory.
> DB.Open "DBQ=" &
> Server.Mappath("C:\Access_Databases\NBA.mdb ") &
> ";Driver={Microsoft Access Driver (*.mdb)};"
>
>
> --Arshad-
>
> --- Paul Johnson <Paul.Johnson@b...> wrote:
> > I'm a beginner with ASP and I'm having a problem
> > connecting to a small
> > Access 97 database which resides on my hard drive
> > (C:\). I'm running
> > Windows 2000 on my PC, with IIS. I getting the
> > following error message:
> >
> > Microsoft JET Database Engine error '80004005'
> >
> > 'C:\Access_Databases\NBA.mdb' is not a valid path.
> > Make sure that the path
> > name is spelled correctly and that you are connected
> > to the server on
> > which the file resides.
> >
> >
> >
> > Here is my ASP code thats generating that error:
> >
> > <HTML>
> > <HEAD>
> > <TITLE>East All-Stars</TITLE>
> > </HEAD>
> > <BODY>
> > <%
> > Dim DB
> > Set DB = Server.CreateObject ("ADODB.Connection")
> > DB.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data
> > Source=C:\Access_Databases\NBA.mdb;User
> > ID=;Password=;")
> >
> > Dim RS
> > Set RS = Server.CreateObject ("ADODB.Recordset")
> > RS.Open "SELECT * FROM East-AllStars", DB
> >
> > If RS.EOF And RS.BOF Then
> > Response.Write "There are 0 records."
> > Else
> > RS.MoveFirst
> > While Not RS.EOF
> > Response.Write RS.Fields ("FirstName")
> > Response.Write RS.Fields ("LastName")
> > Response.Write RS.Fields ("Team")
> > Response.Write RS.Fields ("Position")
> > Response.Write "<HR>"
> > RS.MoveNext
> > Wend
> > End If
> > %>
> > </BODY>
> > </HTML>
> >
> >
> > Can someone please point me in the right direction,
> > I'd really appreciate
> > it.
> >
> > Thanks,
> >
> > Paul
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - live college hoops coverage
> http://sports.yahoo.com/
>
Message #7 by Nikos <pappas@c...> on Tue, 19 Mar 2002 19:17:44 +0200
|
|
Hi there
please send the physical path to the database
and the directory where the site files are located
I dont thing you need server.mappath if you specify the
physical path to the mdb
try
____________________________________________________________________
"Dbq=3D" & Server.Mappath("../Access_Databases/NBA.mdb")& _
";Driver=3D{Microsoft Access Driver (*.mdb)};"
_____________________________________________________________________
For connections take a look at
http://www.able-consulting.com
Cheers
Nikos
At 06:45 =EC=EC 19/3/2002, you wrote:
>Thanks for the help Arshad, I've tried both things and I'm still getting
>the same error. My other simple ASP pages open fine, however they aren't
>trying to connect to a database. I'm only getting this error when I try
>to connect to the Access 97 database.
>
>Thanks again,
>
>Paul
>
> > Hi,
>Try this one,This might work.If still it does not work
>then try by copying your database in you web
>directory.
>DB.Open "DBQ=3D" &
>Server.Mappath("C:\Access_Databases\NBA.mdb ") &
>";Driver=3D{Microsoft Access Driver (*.mdb)};"
>
>
>--Arshad-
>
>--- Paul Johnson <Paul.Johnson@b...> wrote:
> > I'm a beginner with ASP and I'm having a problem
> > connecting to a small
> > Access 97 database which resides on my hard drive
> > (C:\). I'm running
> > Windows 2000 on my PC, with IIS. I getting the
> > following error message:
> >
> > Microsoft JET Database Engine error '80004005'
> >
> > 'C:\Access_Databases\NBA.mdb' is not a valid path.
> > Make sure that the path
> > name is spelled correctly and that you are connected
> > to the server on
> > which the file resides.
> >
> >
> >
> > Here is my ASP code thats generating that error:
> >
> > <HTML>
> > <HEAD>
> > <TITLE>East All-Stars</TITLE>
> > </HEAD>
> > <BODY>
> > <%
> > Dim DB
> > Set DB =3D Server.CreateObject ("ADODB.Connection")
> > DB.Open ("Provider=3DMicrosoft.Jet.OLEDB.4.0;Data
> > Source=3DC:\Access_Databases\NBA.mdb;User
> > ID=3D;Password=3D;")
> >
> > Dim RS
> > Set RS =3D Server.CreateObject ("ADODB.Recordset")
> > RS.Open "SELECT * FROM East-AllStars", DB
> >
> > If RS.EOF And RS.BOF Then
> > Response.Write "There are 0 records."
> > Else
> > RS.MoveFirst
> > While Not RS.EOF
> > Response.Write RS.Fields ("FirstName")
> > Response.Write RS.Fields ("LastName")
> > Response.Write RS.Fields ("Team")
> > Response.Write RS.Fields ("Position")
> > Response.Write "<HR>"
> > RS.MoveNext
> > Wend
> > End If
> > %>
> > </BODY>
> > </HTML>
> >
> >
> > Can someone please point me in the right direction,
> > I'd really appreciate
> > it.
> >
> > Thanks,
> >
> > Paul
> >
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Sports - live college hoops coverage
>http://sports.yahoo.com/
Message #8 by "Drew, Ron" <RDrew@B...> on Tue, 19 Mar 2002 13:22:50 -0500
|
|
Try the following:
Go into windows explorer and create a directory under C:\Inetpub\wwwroot
called Access_Databases
Then copy the mdb to this directory. Right click on the directory
folder and change the permissions to EVERYONE.
Then in the ASP..the response.write will show the path (you may have to
take the ..\ out
set objconn =3D Server.CreateObject("ADODB.Connection")
mdbPath =3D Server.MapPath("..\Access_Databases\NBA.mdb")
response.write mdbPath
objConn.Open "Provider=3DMicrosoft.Jet.OLEDB.4.0;" & _
"Data Source=3D" & mdbPath & ";" & _
"User Id=3Dadmin;" & _
"Password=3D;"
-----Original Message-----
From: Nikos [mailto:pappas@c...]
Sent: Tuesday, March 19, 2002 12:18 PM
To: ASP Databases
Subject: [asp_databases] Re: Connecting to Access 97 via ASP
Hi there
please send the physical path to the database
and the directory where the site files are located
I dont thing you need server.mappath if you specify the physical path to
the mdb try
____________________________________________________________________
"Dbq=3D" & Server.Mappath("../Access_Databases/NBA.mdb")& _
";Driver=3D{Microsoft Access Driver (*.mdb)};"
_____________________________________________________________________
For connections take a look at
http://www.able-consulting.com
Cheers
Nikos
At 06:45 =EC=EC 19/3/2002, you wrote:
>Thanks for the help Arshad, I've tried both things and I'm still
>getting the same error. My other simple ASP pages open fine, however
>they aren't trying to connect to a database. I'm only getting this
>error when I try to connect to the Access 97 database.
>
>Thanks again,
>
>Paul
>
> > Hi,
>Try this one,This might work.If still it does not work
>then try by copying your database in you web
>directory.
>DB.Open "DBQ=3D" &
>Server.Mappath("C:\Access_Databases\NBA.mdb ") & ";Driver=3D{Microsoft
>Access Driver (*.mdb)};"
>
>
>--Arshad-
>
>--- Paul Johnson <Paul.Johnson@b...> wrote:
> > I'm a beginner with ASP and I'm having a problem
> > connecting to a small
> > Access 97 database which resides on my hard drive
> > (C:\). I'm running
> > Windows 2000 on my PC, with IIS. I getting the
> > following error message:
> >
> > Microsoft JET Database Engine error '80004005'
> >
> > 'C:\Access_Databases\NBA.mdb' is not a valid path.
> > Make sure that the path
> > name is spelled correctly and that you are connected
> > to the server on
> > which the file resides.
> >
> >
> >
> > Here is my ASP code thats generating that error:
> >
> > <HTML>
> > <HEAD>
> > <TITLE>East All-Stars</TITLE>
> > </HEAD>
> > <BODY>
> > <%
> > Dim DB
> > Set DB =3D Server.CreateObject ("ADODB.Connection")
> > DB.Open ("Provider=3DMicrosoft.Jet.OLEDB.4.0;Data
> > Source=3DC:\Access_Databases\NBA.mdb;User
> > ID=3D;Password=3D;")
> >
> > Dim RS
> > Set RS =3D Server.CreateObject ("ADODB.Recordset")
> > RS.Open "SELECT * FROM East-AllStars", DB
> >
> > If RS.EOF And RS.BOF Then
> > Response.Write "There are 0 records."
> > Else
> > RS.MoveFirst
> > While Not RS.EOF
> > Response.Write RS.Fields ("FirstName")
> > Response.Write RS.Fields ("LastName")
> > Response.Write RS.Fields ("Team")
> > Response.Write RS.Fields ("Position")
> > Response.Write "<HR>"
> > RS.MoveNext
> > Wend
> > End If
> > %>
> > </BODY>
> > </HTML>
> >
> >
> > Can someone please point me in the right direction,
> > I'd really appreciate
> > it.
> >
> > Thanks,
> >
> > Paul
> >
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Sports - live college hoops coverage http://sports.yahoo.com/
Message #9 by "Paul Johnson" <Paul.Johnson@b...> on Tue, 19 Mar 2002 21:55:38
|
|
Thanks Pete,
I used 3.51, I'm still getting an error but its condensed:
Microsoft JET Database Engine error '80004005'
Couldn't find file 'C:\Inetpub\wwwroot\NBA.mdb'.
Paul
> Did you try putting the database in your wwwroot folder (not inetpub)?
Also, can you use Jet 4 with Access 97? I thought maybe you had to use
3.51 instead of 4.0.
Pete
> -----Original Message-----
> From: Paul Johnson [mailto:Paul.Johnson@b...]
> Sent: Tuesday, March 19, 2002 4:45 PM
> To: ASP Databases
> Subject: [asp_databases] Re: Connecting to Access 97 via ASP
>
>
> Thanks for the help Arshad, I've tried both things and I'm
> still getting
> the same error. My other simple ASP pages open fine, however
> they aren't
> trying to connect to a database. I'm only getting this error
> when I try
> to connect to the Access 97 database.
>
> Thanks again,
>
> Paul
>
> > Hi,
> Try this one,This might work.If still it does not work
> then try by copying your database in you web
> directory.
> DB.Open "DBQ=" &
> Server.Mappath("C:\Access_Databases\NBA.mdb ") &
> ";Driver={Microsoft Access Driver (*.mdb)};"
>
>
> --Arshad-
>
> --- Paul Johnson <Paul.Johnson@b...> wrote:
> > I'm a beginner with ASP and I'm having a problem
> > connecting to a small
> > Access 97 database which resides on my hard drive
> > (C:\). I'm running
> > Windows 2000 on my PC, with IIS. I getting the
> > following error message:
> >
> > Microsoft JET Database Engine error '80004005'
> >
> > 'C:\Access_Databases\NBA.mdb' is not a valid path.
> > Make sure that the path
> > name is spelled correctly and that you are connected
> > to the server on
> > which the file resides.
> >
> >
> >
> > Here is my ASP code thats generating that error:
> >
> > <HTML>
> > <HEAD>
> > <TITLE>East All-Stars</TITLE>
> > </HEAD>
> > <BODY>
> > <%
> > Dim DB
> > Set DB = Server.CreateObject ("ADODB.Connection")
> > DB.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data
> > Source=C:\Access_Databases\NBA.mdb;User
> > ID=;Password=;")
> >
> > Dim RS
> > Set RS = Server.CreateObject ("ADODB.Recordset")
> > RS.Open "SELECT * FROM East-AllStars", DB
> >
> > If RS.EOF And RS.BOF Then
> > Response.Write "There are 0 records."
> > Else
> > RS.MoveFirst
> > While Not RS.EOF
> > Response.Write RS.Fields ("FirstName")
> > Response.Write RS.Fields ("LastName")
> > Response.Write RS.Fields ("Team")
> > Response.Write RS.Fields ("Position")
> > Response.Write "<HR>"
> > RS.MoveNext
> > Wend
> > End If
> > %>
> > </BODY>
> > </HTML>
> >
> >
> > Can someone please point me in the right direction,
> > I'd really appreciate
> > it.
> >
> > Thanks,
> >
> > Paul
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - live college hoops coverage
> http://sports.yahoo.com/
>
Message #10 by "Ken Schaefer" <ken@a...> on Wed, 20 Mar 2002 13:27:38 +1100
|
|
Sorry for the 101 question but:
Is the database actually on the c: drive of the computer that is running the
webserver? Eg are you running IIS on your machine, and the database is also
on your machine? (or if you are running the website on a server, is the
database also located on the server's c:\ drive?)
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Paul Johnson" <Paul.Johnson@b...>
Subject: [asp_databases] Re: Connecting to Access 97 via ASP
: I used 3.51, I'm still getting an error but its condensed:
:
: Microsoft JET Database Engine error '80004005'
: Couldn't find file 'C:\Inetpub\wwwroot\NBA.mdb'.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
 |