vbscript create ADODB.Connection 1

vbscript create ADODB.Connection

Dim objConn 'As ADODB.Connection'
Set objConn = Server.CreateObject("ADODB.Connection")

Dim strPath 'As String'
strPath = Server.MapPath("\App_Data\direkt.mdb")
Call objConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strPath)

Here is what the above code is Doing:
1. It’s creating a connection object.
2. It’s setting the path to the database.
3. It’s opening the connection.

Similar Posts