Uploading Connection String?

G

Guest

I've got a Web App developed via VBNet. I'm using WebForms and a small Access database. It's easy enough to set the connection string when the database is on my local machine. However...I need to upload both the app and the database. Is there a way I can set the connection string similar to the old App.path routine?

Thanks
 
K

Ken Cox [Microsoft MVP]

Hi Arne,

I suspect you are looking for server.mappath("accessdb.mdb") to use in
building the connection string.

Ken
 
G

Guest

Thanks...
I think that's what I need...should the line in the connection string look like this?
....
"DataSource=server.mappath("MyDB.mdb"); " & _
....

It doesn't seem to accept it the way I have it written.

Thanks...
 
K

Ken Cox [Microsoft MVP]

Hi Arne,

More like:

"DataSource=" & server.mappath("MyDB.mdb") & "; " & _
 

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,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top