Access Database Connection string in Classic ASP

Classic ASP Comments Off on Access Database Connection string in Classic ASP

Access Database connection string in Classic ASP. Example is given with connection object, how to open the connection object using the connection string.


straddress = server.MapPath("myaccessdatabase.mdb")

 strconnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source = " & straddress & ";" &" Persist Security Info=False"

 set objconn=server.CreateObject("adodb.connection")

 objConn.open strconnect

In the above snippet the variable strconnect holds connection string.



Author

Search

Back to Top