DSN-less connection to MS Access Database Print

  • 0

Sample of DSN-less connection string for MS Access database:

You can create sample test aspx file for this connection string, for example conn.aspx inside wwwroot directory. The actual sample is:

Dim conStr,path
path=Server.MapPath(".")
path=replace(path,"\wwwroot","")
path=path & "\data\database.mdb"
conStr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & path


The ms access database file should be located in directory data. Use the actual name of your database instead of database.mdb.

Was this answer helpful?

« Back