Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ezhov-da/5489423d12f813f8f3af50d768583824 to your computer and use it in GitHub Desktop.
Save ezhov-da/5489423d12f813f8f3af50d768583824 to your computer and use it in GitHub Desktop.
vba подключение к mysql без odbc
Sub test()
Dim oConn As Object
Set oConn = New ADODB.Connection
oConn.Open "DRIVER={MySQL ODBC 3.51 Driver};" & _
"SERVER=server;" & _
"DATABASE=db;" & _
"UID=uid;" & _
"PASSWORD=pass;" & _
"PORT:3306;" & _
"charset=cp1251;" & _
"Option=3;"
If oConn.State = adStateOpen Then
MsgBox "Connected! =)"
Else
MsgBox "fuck... =("
End If
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment