Connect to a remote or network database using ADO
Connect to a remote or network database using ADO
API Declarations
'Be sure to reference to Microsoft ActiveX Data Objects 2.0
dim conn as new ADODB.connection
dim rec as new ADODB.recordset
Rate Connect to a remote or network database using ADO
(1(1 Vote))
'where servername is the name of the computer
'in which this program connects and path is the
'path or folder in which the database file resides
'and the databasename is the name of the MSAccess Database
conn.open conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data " & _
"Source=\\ServerName\path\DatabseName;Persist " & _
"Security Info=False"
if conn.state = 1 then
'conncetion was successfully opened
msgbox "Connection Successful"
end if
Connect to a remote or network database using ADO Comments
No comments yet — be the first to post one!
Post a Comment