今天用免费云服务器,三丰云 做mysql客户端程序,开发语言是vb6
发现驱动程序过高如8.x无法安装,过低如3.x运行报错,5.3刚刚好。
驱动下载地址
https://downloads.mysql.com/archives/c-odbc/
https://cdn.mysql.com/archives/mysql-connector-odbc-5.3/mysql-connector-odbc-5.3.0-alpha-win32.msi
Private Sub Form_Load()
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim strConn As String
'strConn = "DRIVER={MySQL ODBC 5.3 Unicode Driver};SERVER=localhost;DATABASE=c;UID=root;PWD=root;"
Set conn = New ADODB.Connection
conn.Open strConn
Set rs = New ADODB.Recordset
rs.Open "SELECT * FROM jiaoyi where team1=2", conn, adOpenStatic, adLockReadOnly
Do While Not rs.EOF
Debug.Print rs("play1").Value
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
End Sub