Connectionstring in web.config for AccessDB, mappath???

  • Thread starter Thread starter gpig
  • Start date Start date
G

gpig

How do you map an Access database on a webserver? It is only relative
to all my ASP.net webforms, and all my oledbconnections point to my
connectionstring in the web.config. But how do you map the URL in XML
to the localpath.
At the moment I'm getting URI errors, my deadline is only 8hours away
and I'm in a spot of bother right now.

Any suggestions will help, Please!
 
Hi gpig,

What are you trying to archieve, as far as I know can you not access an
Access database over the net?

You can use it in your web but again as far as I know only as a datasource
for your pages.
I never saw another method for Access.

Cor
 
I'm using the DB as a datasource for a website I'm doing, all the
webforms and DB will be on a webserver.

I narrowed down the problem but DON'T hava a solution yet...The
connectionstring in my XML web.configused to give connectiondetails
to my webforms, aren't pointing to my DB. This is because with a
Access DB you have to point to the full path name of the DB? ex:
c:\inetpub\wwwroot\sitename\databasedirectory\db.mdb. The problem is,
I have no idea what the full path will be on the server, and don't
know when I'll eventially find out from my contracters...and I can't
give it an http address. In classic ASP, you could use the
server.mapPath(address) to convert the address. But now the address
is stuck in an XML file and I don't know how to do the equivalent in
XML. The URI errors is a result of the incompatible paths, http and
server path. If I don't use a connectionstring from the XML file, I
can use the mappath in the codebehind of my webforms, but it gives my
some wierd "double' error when I run a page.

Does anyone know of an easy solution? Maybe an XML tag to do a mappath
 
Back
Top