473,387 Members | 3,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 2003
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Henrik | last post by:
Hello I starting use ASP.NET and has created a new file to open a Access database I get these error and cant solve it - please need some help. I Use Windows 2000 (have also tried to put it...
25
by: Neo Geshel | last post by:
This works: <form> <asp:TextBox id="name" /> <%= name.ClientID %> </form> But this DOES NOT work: <form>
18
by: Wim | last post by:
Hi, I would like to make and put a query in my database by VB.NET code. Is this possible? Thanks for your help, wim
2
by: Enska | last post by:
I have problems connecting my access database I get information .. I cant use my database and I'm administrator on my computer so permission shutnot bee problem, but I dont know Where is the...
24
by: dancer | last post by:
Using ASP.net 1.1 and Microsoft Access. I received the following error message. Why? I have closed the Access file. I have another very small access file that opens with no trouble with the...
0
by: tom | last post by:
When I try to read in a csv file it gives me this error message. 'Cannot update. Database or object is read-only.' If I change the extension to txt it processes just fine. I have googled all...
2
by: fniles | last post by:
I am using VB.NET 2005 and MS Access. I use OLEDbCommand ExecuteNonQuery to delete a record from a database. Whenever the program gets a message, it creates a new thread to process that message....
1
Curtis Rutland
by: Curtis Rutland | last post by:
How To Use A Database In Your Program Part II This article is intended to extend Frinny’s excellent article: How to Use a Database in Your Program. Frinny’s article defines the basic concepts...
0
by: gobblegob | last post by:
Hello All, I am getting an error trying to update datagridview1 , what i am trying to do is search for an item (BarCode.text) and then display the results to datagridview1 but i just cannot manage...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.