‘Visual Basic can connect the database through the internet connection, this is very useful when you want to centralize the database or connect the different locations let say for example the company has three ‘branches in different cities or country so you must setup one for database server and the rest connect the server as client.
‘Visual Basic Sample Code
Dim RS As Recordset
Dim cnnGeneric As Connection
Set Conn = New Connection
Conn.Open
“Provider=MS Remote;” _
& “Remote Provider=MSDataShape;” _
& “Remote Server=http://www.mydomain.com;” _
& “Data Source=Employee;” _
& “User Id=myusername;Password=mypassword;”
Set RS = New Recordset
With RS
.CursorLocation = adUseClient
.Open strQuery, Conn, adOpenStatic, adLockReadOnly
.ActiveConnection = Nothing
End
With