Last post Dec 10, 2008 03:40 PM by Mikesdotnetting
Dec 10, 2008 03:18 PM|smcclintock|LINK
This will probably be easy to most of you but I'm have a horrible time finding a fix. I'm also pretty new to asp.net and vb.net
I have an ADO connection:
strPath = "\\Hertz207\www\HLE\App_Data\HLE_LocationCalls_be.mdb"
dbConn = New ADODB.Connection
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Properties("Data Source").Value = strPath
The problem is the server. I develop on 207 but prod is 294. The file structure is identical.
I thought I could write this: strPath = "~\App_Data\HLE_LocationCalls_be.mdb" and it would handle it but I get an error.
I don't want to have to manually change connections every time I have to edit code!!
Thanks in advance!!
Dec 10, 2008 03:40 PM|Mikesdotnetting|LINK
Don't use ADODB Connections in ASP.NET. Use ADO.NET. To connect to Access, read this: