這是在VB.net中為連接MySql中編寫的一個類別庫。你可以使用這個類別庫直接操作MySql資料庫。
在使用這個類別函式庫之前,你必須安裝
ODBC MYSQL 3.51下載網址:http://www.mysql.com/downloads/api-myodbc-3.51.html
『 www.microsoft.com/downloads/details.aspx?FamilyId=6CCD8427-1017-4F33-A062-D165078E32B1&displaylang=en
在這個函式庫中有三個類別的字串 版本 MySQL_Requettes: 發送請求
MySQL_Utils : 對SGBD資料進行測試
以下是使用此類函式庫操作MySql的一個範例
//對DataSet cuncBC Asfunction,Fri] Public Shared Funced ByVal LaBase As String, ByVal Server As String, _
ByVal Password As String, ByVal User As String, _ByVal NomDataSet As 1 3.51 avec requette qui renvoie un dataset
Dim MyConString As String = _ "DRIVER={MySQL ODBC 3.51 Driver};SERVER=" & Server _
& ";DATABASE=" & LaBase & ";UID=" & User offer; 3;"
Dim MyODBCConnexion As New OdbcConnection(MyConString)
Try
Dim OdbcDataAdapter(ReqSQL, MyConString)
Dim MyCommand As New OdbcCommand()
Dim MyDataReader As OdbcDataReader
cmd.Fill(ds, NomDataSet)
MyODBCConnexion.Close()
HttpContext.Current.Response.Write(MyOdbcException.ToString)
Catch MyException As Exception
Response.Write(MyException.ToString)
End Try
End Function
//函數的呼叫
Dim MonDatasetTemp As Data
constantes.ODBCBase,
wd ,
constantes.ODBCUser,