You are on page 1of 1

Public cn As ADODB.

Connection
Public rs As ADODB.Recordset
Sub main()
Set cn = New ADODB.Connection
cn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver}; _
& "SERVER=192.100.50.1 ;" _
'ip address of the remote computer
& "Port=3306;" _
& "DATABASE=" & studentinfo & ";" _
'databasename
& "UID=" & root & ";" _
'serverusername
& "PWD=" & & ";" _
'serverpassword (no password)
& "OPTION=" & 1 + 2 + 8 + 32 + 2048 + 16384
cn.Open
End Sub

You might also like