Home All Groups Group Topic Archive Search About

Database paths in a web app

Author
25 Mar 2005 11:21 PM
Adam Clauss
I am developing a C# web application from a machine running Windows XP.  The
web server is a remote machine running Windows Server 2003.

As a data source in this application we are using an Access database (.mdb).
Right now, this database is simply residing in the root folder of the
application (aka on the server).

I'm running into a problem concerning the path to this database.  The path
from the development machine is a mapped drive y:\inetpub\wwwroot\...
However, from the server itself, it is simply a c:\inetpub\wwwroot\....

Now, Visual Studio needs it to be the mapped path (Y:) for all its
"features" to work (generation of datasets, etc).  However, obviously the
server doesn't know what the Y: is, so it throws an exception when I try to
run the web app.
If I give it the "local path" (C:) then the application runs, however I
cannot use any of Visual Studio's features.

How do I get around this (without just giving up on the Access database)?

--
Adam Clauss
caba***@tamu.edu

Author
26 Mar 2005 2:59 AM
Peter Bromberg [C# MVP]
I hate to say this, but frankly MSDE is a freebie, it mirrors SQL Server
virtually 100%, and you won't need to go through all this pain once you
migrate your Access stuff to it .... Plus, the new SQL Server 2005 Express
is even better.
Peter

Show quote
"Adam Clauss" <cabadam@nospam.tamu.edu> wrote in message
news:earzrGZMFHA.2748@TK2MSFTNGP09.phx.gbl...
>I am developing a C# web application from a machine running Windows XP.
>The
> web server is a remote machine running Windows Server 2003.
>
> As a data source in this application we are using an Access database
> (.mdb).
> Right now, this database is simply residing in the root folder of the
> application (aka on the server).
>
> I'm running into a problem concerning the path to this database.  The path
> from the development machine is a mapped drive y:\inetpub\wwwroot\...
> However, from the server itself, it is simply a c:\inetpub\wwwroot\....
>
> Now, Visual Studio needs it to be the mapped path (Y:) for all its
> "features" to work (generation of datasets, etc).  However, obviously the
> server doesn't know what the Y: is, so it throws an exception when I try
> to
> run the web app.
> If I give it the "local path" (C:) then the application runs, however I
> cannot use any of Visual Studio's features.
>
> How do I get around this (without just giving up on the Access database)?
>
> --
> Adam Clauss
> caba***@tamu.edu
>
>
>
>
Author
26 Mar 2005 3:21 AM
Landi
why do you have to call it through Y:/ bla bla bla
can you share that file? that way you can call it like
//machinename/directory/file.mdb

--
i***@dowhileloop.com
http://dowhileloop.com website development
http://publicjoe.dowhileloop.com -- C# Tutorials
Show quote
"Adam Clauss" <cabadam@nospam.tamu.edu> wrote in message
news:earzrGZMFHA.2748@TK2MSFTNGP09.phx.gbl...
> I am developing a C# web application from a machine running Windows XP.
The
> web server is a remote machine running Windows Server 2003.
>
> As a data source in this application we are using an Access database
(.mdb).
> Right now, this database is simply residing in the root folder of the
> application (aka on the server).
>
> I'm running into a problem concerning the path to this database.  The path
> from the development machine is a mapped drive y:\inetpub\wwwroot\...
> However, from the server itself, it is simply a c:\inetpub\wwwroot\....
>
> Now, Visual Studio needs it to be the mapped path (Y:) for all its
> "features" to work (generation of datasets, etc).  However, obviously the
> server doesn't know what the Y: is, so it throws an exception when I try
to
> run the web app.
> If I give it the "local path" (C:) then the application runs, however I
> cannot use any of Visual Studio's features.
>
> How do I get around this (without just giving up on the Access database)?
>
> --
> Adam Clauss
> caba***@tamu.edu
>
>
>
>

AddThis Social Bookmark Button