MySQL 也出了 OLE DB Provider,可以下载(含 VB 例程 Insert、Delete、Update 等):http://210.77.60.218/mirror/mysql/Downloads/Win32/MyOLEDB.exe'ODBC +OLEDB 'adoConnection.Open "Provider=MSDASQL.1;Driver={MySQL};host=localhost;DataBase=test;User ID=monty" 'OLEDB adoConnection.Open "Provider=MySqlProv.2.5;data source=test;User ID=monthy;server=localhost" Dim adoRecordset As New adodb.Recordset adoRecordset.CursorLocation = adUseClient adoRecordset.Open "SELECT * FROM sample2", adoConnection, adOpenKeyset Debug.Print adoRecordset.GetString Set DataGrid1.DataSource = adoRecordset
'adoConnection.Open "Provider=MSDASQL.1;Driver={MySQL};host=localhost;DataBase=test;User ID=monty"
'OLEDB
adoConnection.Open "Provider=MySqlProv.2.5;data source=test;User ID=monthy;server=localhost"
Dim adoRecordset As New adodb.Recordset
adoRecordset.CursorLocation = adUseClient
adoRecordset.Open "SELECT * FROM sample2", adoConnection, adOpenKeyset
Debug.Print adoRecordset.GetString
Set DataGrid1.DataSource = adoRecordset