Referring to a folder other than App_Data

J

jonefer

for an MS Access MDB file I am using a 3rd party Web server that requires you
store it in a directory called "_Database" INSTEAD of the usual App_Data
folder

Ok, so for my Web.Config:
<add name="CG_Cnn" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source="_Database\MyDatabase.mdb;""
providerName="System.Data.OleDb" />

But then I receive the error:

System.Data.OleDb.OleDbException was unhandled by user code
ErrorCode=-2147467259
Message="'C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\_Database\MyDatabase.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."
Source="Microsoft JET Database Engine"

=======
This '_Database' folder exists on the same folder as App_Data would - so
I'm assuming, you could basically swap |DataDirectory| with the name--In this
case, what I've tried above.

Does the |DataDirectory| need to be dismantled or erased before you can
refer to an MS Access database inside the application root directory? What
am I missing?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top