How to Access a MS Access Database in a webserver


I have a database that is located outside of root.
I was given following code by my host but I couldnt get it work.
Private Sub Connection()
Dim strPath = Server.MapPath("/")
Dim strPathDatabase = Replace(strPath, "\www", "\database")
Dim strConnection = strPathDatabase & "\RecordLabel.mdb"
Dim sConnectionString As New String("Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & CStr(strConnection) & ";")
dbconn = New OleDbConnection(sConnectionString)
End Sub
End Class
Any help appriciated?
1/27/2005 8:34:44 PM 4679 articles. 0 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 14

let me just clarify something. is the root

or is it
/wwwroot/WebAPPTest4/default.aspx ?
because frpom your question, it looks like the DB is in
so NOT outside the root directory. needs clarification.
RTFM - straight talk for web developers. Unmoderated, uncensored, occasionally unreadable

Jason Brown - MVP, IIS
1/28/2005 6:51:26 AM
Thanx AStrax.

I fixed the issue.
Thanks again.
1/30/2005 2:50:22 AM

Web resources about - How to Access a MS Access Database in a webserver -

Apache webserver updated to ignore Do Not Track settings in IE 10
Developers of Apache, the Internet's most widely used webserver application, have released an update that causes websites to ignore privacy settings ...

Nokia's "Raccoon" project turns cellphones into webservers
It's been no secret that Nokia has been working on a mobile web server, lovingly codenamed project "Raccoon," but now they've taken things one ...

Using an Android as a webserver
In the latest episode of XDA TV [Adam Outler] turned his Android phone into a webserver . At first this might sound comical, but the ever-increasing ...

In Those Obamacare Webservers Crashing, the Sound of Tea Party Doom
... exchange sites saw so much traffic from people interested in signing up for Obamacare that they bogged down... and in the sound of those webservers ...

Using WebGL to Render Kinect Webserver Image Data
... for Windows events and developments and preview the futuristic world of touch-free computing Our 1.8 release includes a sample called WebserverBasics-WPF ...

Über stealthy malware infects Apache webservers
Über stealthy malware corrupts legit webservers

Be the Master of Your Own Domain With a DIY Webserver
You don't have to sift through a storm of cloud services to figure out which is right for you ¿ create your very own web server that does whatever ...

Eggcyte: the webserver you can put in your pocket
The Egg is a webserver; a storage device; a Wi-Fi hotspot; and, maybe, a security service. It puts the "mobile" Internet a reality: it fits in ...

Employee "Disciplined" For Installing Bitcoin Software On Federal Webservers
Fluffeh writes "Around a year ago, a person working for the ABC in Australia with the highest levels of access to systems got caught caught with ...

Apache webserver updated to ignore Do Not Track settings in IE10 -> 0
An Apache webserver update has been released that ignores the 'Do Not Track' privacy setting sent from IE. Patch author and Adobe employee Roy ...

Resources last updated: 1/16/2016 2:52:26 PM