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

Members online

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top