469,345 Members | 5,921 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,345 developers. It's quick & easy.

I cannot find my database using oledbConnection

I put the following code in my asp.net page:
dbPath = MapPath("/FBDB/db1_newport2003.mdb")
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;"
strConnect = strConnect & "Data Source=" & dbpath & ";"

objConnect = new OleDbConnection(strConnect)
=============================
but I get the following error:

<b>* Error while updating original data</b>.<br
/>:'D:\hshome\merctvl\mercurytravelgroup.com\FBDB\d b1_newport2003.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.<br
/>Microsoft JET Database Engine

How can the path be invalid? The path was produced by the function
MapPath, so it must be valid!
-- Marvin

Nov 19 '05 #1
3 1858
Well, 'D:\hshome\merctvl\mercurytravelgroup.com\FBDB\db1 _newport2003.mdb'
isn't any path I've ever seen. The portion of the path
"mercurytravelgroup.com" sounds more like a URL than a file path. The
easiest thing to do is to go and actaully look at the physical path to your
database and see if it is EXACTLY what you post here.

The problem could be stemming from your leading forward-slash in the mapPath
argument. If FBDB is a child directory of the current application folder,
you should NOT be using a leading forward-slash (/) in front of it. If FBDB
is an immediate child of the virtual directory's root, then you need the
forward-slash. In other word, MapPath takes a relative path and you may
have expressed that incorrectly.

Also, are you using MS FrontPage? I ask because FrontPage creates an "FPDB"
folder for your databases, not a "FBDB" folder. If you are using FrontPage,
are you sure you haven't mistakenly written a "B" instead of a "P"?
"COHENMARVIN" <co*********@hotmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
I put the following code in my asp.net page:
dbPath = MapPath("/FBDB/db1_newport2003.mdb")
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;"
strConnect = strConnect & "Data Source=" & dbpath & ";"

objConnect = new OleDbConnection(strConnect)
=============================
but I get the following error:

<b>* Error while updating original data</b>.<br
/>:'D:\hshome\merctvl\mercurytravelgroup.com\FBDB\d b1_newport2003.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.<br
/>Microsoft JET Database Engine

How can the path be invalid? The path was produced by the function
MapPath, so it must be valid!
-- Marvin

Nov 19 '05 #2
Thank you Scott. The problem was that I misspelt the FPDB directory as
FBDB. Apparently the asp.net MAPPATH statement will accept a directory
such as /FBDB even when that directory does not exist. I am still
having problems getting the page to work, now it says:
"Error while updating original data</b>.<br />:The INSERT INTO
statement contains the following unknown field name:
'"ADULT1_FIRSTNAME"'. Make sure you have typed the name correctly, and
try the operation again.<br />Microsoft JET Database Engine"
I looked at the database, and it definitely has the field name in it.
Also, the code used to work when it was plain ASP.
Anyway, thanks for getting me past hurdle #1.
-- Marvin

Scott M. wrote:
Well, 'D:\hshome\merctvl\mercurytravelgroup.com\FBDB\db1 _newport2003.mdb' isn't any path I've ever seen. The portion of the path
"mercurytravelgroup.com" sounds more like a URL than a file path. The easiest thing to do is to go and actaully look at the physical path to your database and see if it is EXACTLY what you post here.

The problem could be stemming from your leading forward-slash in the mapPath argument. If FBDB is a child directory of the current application folder, you should NOT be using a leading forward-slash (/) in front of it. If FBDB is an immediate child of the virtual directory's root, then you need the forward-slash. In other word, MapPath takes a relative path and you may have expressed that incorrectly.

Also, are you using MS FrontPage? I ask because FrontPage creates an "FPDB" folder for your databases, not a "FBDB" folder. If you are using FrontPage, are you sure you haven't mistakenly written a "B" instead of a "P"?
"COHENMARVIN" <co*********@hotmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
I put the following code in my asp.net page:
dbPath = MapPath("/FBDB/db1_newport2003.mdb")
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;"
strConnect = strConnect & "Data Source=" & dbpath & ";"

objConnect = new OleDbConnection(strConnect)
=============================
but I get the following error:

<b>* Error while updating original data</b>.<br
/>:'D:\hshome\merctvl\mercurytravelgroup.com\FBDB\d b1_newport2003.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.<br />Microsoft JET Database Engine

How can the path be invalid? The path was produced by the function
MapPath, so it must be valid!
-- Marvin


Nov 19 '05 #3
All I can say is that this message is generally pretty clear in that it
can't find a field with the name you specify. Are you sure you are
accessing the correct database and/or the correct table?
"COHENMARVIN" <co*********@hotmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Thank you Scott. The problem was that I misspelt the FPDB directory as
FBDB. Apparently the asp.net MAPPATH statement will accept a directory
such as /FBDB even when that directory does not exist. I am still
having problems getting the page to work, now it says:
"Error while updating original data</b>.<br />:The INSERT INTO
statement contains the following unknown field name:
'"ADULT1_FIRSTNAME"'. Make sure you have typed the name correctly, and
try the operation again.<br />Microsoft JET Database Engine"
I looked at the database, and it definitely has the field name in it.
Also, the code used to work when it was plain ASP.
Anyway, thanks for getting me past hurdle #1.
-- Marvin

Scott M. wrote:
Well,

'D:\hshome\merctvl\mercurytravelgroup.com\FBDB\db1 _newport2003.mdb'
isn't any path I've ever seen. The portion of the path
"mercurytravelgroup.com" sounds more like a URL than a file path.

The
easiest thing to do is to go and actaully look at the physical path

to your
database and see if it is EXACTLY what you post here.

The problem could be stemming from your leading forward-slash in the

mapPath
argument. If FBDB is a child directory of the current application

folder,
you should NOT be using a leading forward-slash (/) in front of it.

If FBDB
is an immediate child of the virtual directory's root, then you need

the
forward-slash. In other word, MapPath takes a relative path and you

may
have expressed that incorrectly.

Also, are you using MS FrontPage? I ask because FrontPage creates an

"FPDB"
folder for your databases, not a "FBDB" folder. If you are using

FrontPage,
are you sure you haven't mistakenly written a "B" instead of a "P"?
"COHENMARVIN" <co*********@hotmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
>I put the following code in my asp.net page:
> dbPath = MapPath("/FBDB/db1_newport2003.mdb")
> strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;"
> strConnect = strConnect & "Data Source=" & dbpath & ";"
>
> objConnect = new OleDbConnection(strConnect)
> =============================
> but I get the following error:
>
> <b>* Error while updating original data</b>.<br
> />:'D:\hshome\merctvl\mercurytravelgroup.com\FBDB\d b1_newport2003.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.<br > />Microsoft JET Database Engine
>
> How can the path be invalid? The path was produced by the function
> MapPath, so it must be valid!
> -- Marvin
>

Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Henrik | last post: by
25 posts views Thread by Neo Geshel | last post: by
18 posts views Thread by Wim | last post: by
24 posts views Thread by dancer | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.