VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Connect to a remote or network database using ADO

by Cecilio Barra III (1 Submission)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 10th August 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

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



'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



Download this snippet    Add to My Saved Code

Connect to a remote or network database using ADO Comments

No comments have been posted about Connect to a remote or network database using ADO. Why not be the first to post a comment about Connect to a remote or network database using ADO.

Post your comment

Subject:
Message:
0/1000 characters