objConn.Open sCS, "UserName","Password" ' {do something} objConn.Close Set objConn = nothing
sCS = "Provider=Microsoft.Jet.OLEDB.4.0;" sCS = sCS & "Data Source=c:\somepath\mydb.mdb;" sCS = sCS & "User Id=admin;Password=;"
objConn.Open sCS ' {do something} objConn.Close Set objConn = nothing
strConn = "Provider=SQLOLEDB.1;Persist Security Info=False;" & _ "Integrated Security=SSPI;" & _ "User ID=" & """" & ";" & _ "Password=" & """" & ";" & _ "Initial Catalog=" & sCatalogName & ";" & _ "Data Source=" & sDSN & ";" & _ "Connect Timeout=10" & _ "Persist Security Info=False" cn.Open strConn
strConn = "Provider=SQLOLEDB.1;Persist Security Info=False;" & _ "User ID=" & sUserName & ";" & _ "Password=" & sPassword & ";" & _ "Initial Catalog=" & sCatalogName & ";" & _ "Data Source=" & sDSN & ";" & _ "Connect Timeout=10" & _ "Persist Security Info=False" cn.Open strConn
strConn = "Provider=MSDAORA.1;" & _ "User ID=" & sUserName & ";" & _ "Password=" & sPassword & ";" & _ "Data Source=" & sSID_Name & ";" & _ "Persist Security Info=False" cn.Open strConn
strConn = "Driver={SYBASE ASE ODBC Driver};" & _ "Srvr=" & sServerName & ";" & _ "Uid=" & sUserName & ";" & _ "Pwd=" & sPassword & ";" & _ "Database=" & sDatabaseName & ";" cn.Open strConn