How to create an OleDb connection using 3.5.

By staffan.bostrom ·
How do I create an OleDb connection to an MS Access database that may be placed differently on different executing machines?

I create a database app on my local PC using VS 2008. The connection string contains a hardcoded absolute path to my Access database (can be picked up from web.config)and that is OK as long as I have full control of its location.
When the app is useful, I want to move it to a web hotel and my database file will be placed somewhere relative to my personal webroot on the web server. I am able to create a DSN on the web server, but OleDb does not seem to be able to use that information to connect to my database.

So, how do I create a connection string using a relative path to my database?


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Related Discussions

Related Forums