473,839 Members | 1,438 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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=Micro soft.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\me rctvl\mercurytr avelgroup.com\F BDB\db1_newport 2003.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 2030
Well, 'D:\hshome\merc tvl\mercurytrav elgroup.com\FBD B\db1_newport20 03.mdb'
isn't any path I've ever seen. The portion of the path
"mercurytravelg roup.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"?
"COHENMARVI N" <co*********@ho tmail.com> wrote in message
news:11******** *************@o 13g2000cwo.goog legroups.com...
I put the following code in my asp.net page:
dbPath = MapPath("/FBDB/db1_newport2003 .mdb")
strConnect = "Provider=Micro soft.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\me rctvl\mercurytr avelgroup.com\F BDB\db1_newport 2003.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_FIRSTN AME"'. 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\merc tvl\mercurytrav elgroup.com\FBD B\db1_newport20 03.mdb' isn't any path I've ever seen. The portion of the path
"mercurytravelg roup.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"?
"COHENMARVI N" <co*********@ho tmail.com> wrote in message
news:11******** *************@o 13g2000cwo.goog legroups.com...
I put the following code in my asp.net page:
dbPath = MapPath("/FBDB/db1_newport2003 .mdb")
strConnect = "Provider=Micro soft.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\me rctvl\mercurytr avelgroup.com\F BDB\db1_newport 2003.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?
"COHENMARVI N" <co*********@ho tmail.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.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_FIRSTN AME"'. 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\merc tvl\mercurytrav elgroup.com\FBD B\db1_newport20 03.mdb'
isn't any path I've ever seen. The portion of the path
"mercurytravelg roup.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"?
"COHENMARVI N" <co*********@ho tmail.com> wrote in message
news:11******** *************@o 13g2000cwo.goog legroups.com...
>I put the following code in my asp.net page:
> dbPath = MapPath("/FBDB/db1_newport2003 .mdb")
> strConnect = "Provider=Micro soft.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\me rctvl\mercurytr avelgroup.com\F BDB\db1_newport 2003.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
5062
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 in to the server Widows 2003) Here is my Error - waht is wrong:
25
4080
by: Neo Geshel | last post by:
This works: <form> <asp:TextBox id="name" /> <%= name.ClientID %> </form> But this DOES NOT work: <form>
18
3048
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
2124
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 problem. Can enybody help me!!!! Server Error in '/Koulu/tietokannat' Application. -------------------------------------------------------------------------------- The Microsoft Jet database engine cannot open the file...
24
5091
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 same code, except a different name for the file. The Microsoft Jet database engine cannot open the file 'C:\Inetpub\wwwroot\Accident.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
0
2279
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 sites on this and I haven't found anything to help. (tried registry stuff, reinstall .NET 2.0, patches). This just broke out the blue too which is weird because it was running fine on our server on monday but now it pukes. Here is the code. ...
2
3745
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. In the thread I open the database, then process the message. Sometimes I get an error "Error Cannot open action query ''". Why can it execute the query and how to fix it ? Thank you. Public Class Best
1
27129
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 of using databases very well and is prerequisite reading for this article. Frinny’s article explains how to use a SQL Server in your program, but there are other databases as well. Some of them provide .NET connectors, but for those that don’t,...
0
1922
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 to do it , please help me i have been trying for days :( here is what i have this code is extremely crappy as i have read lots of tutorials and searches.... Imports System.Data.OleDb Public Class ServiceCompletedForm Dim connStr As...
0
9856
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9698
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10299
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9434
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7834
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5684
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.