Problem with MapPath

D

Dave Nichols

I'm working on an ASP.NET project that uses an Access Database. I
created a component with an OleDbDataAdapter to handle connectivity with
the db and it works great on my dev box. When I upload to the server it
fails because the path to the db is hardwired. I tried to use
Server.MapPath and Server is not known on the .cs page. On my .aspx
pages when creating a new connection MapPath works fine. I'm working
with C# and would really like to take advantage of the component as a
time saver. Does anyone know how I can implement MapPath for the source
in the connection string for the DataAdapter connection?

Dave Nichols
 

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

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top