ASP.NET 2.0 連結MYSQL

ASP.NET 2.0 連結MYSQL

先安裝MYSQL Connector 載點

其餘用法與MSSQL 略同

EX:      

01   Dim conn1 As MySqlConnection = New MySqlConnection("Database=DBName; Data Source=HostName; User Id=Account; Password=Password; CharSet=big5;")
02         Dim DBstr1 As String = "Select * From ABC Order by ID"
03         Dim DA1 As MySqlDataAdapter = New MySqlDataAdapter(DBstr1, conn1)
04         Dim DS1 As DataSet = New DataSet
05         Try
06             conn1.Open()
07             DA1.Fill(DS1, "Data")
08         Catch ex As Exception
09             MsgBox(ex.Message)
10         Finally
11             conn1.Close()
12         End Try


posted on 2008/2/26 11:07 | 我要推薦 | 閱讀數 : 2069 | 分類[ 程式設計 ] 訂閱

關連文章

Comments on this entry:

# re: ASP.NET 2.0 連結MYSQL

Left by 路人甲 at 2008/4/6 下午 11:32
大大 那載點 好像不能下載耶
回覆

# re: ASP.NET 2.0 連結MYSQL

Left by andyj at 2008/11/11 上午 11:05

to 路人甲 :
載點已經更新了

回覆

回應:



 (will not be displayed)

 

 
 
Please add 7 and 8 and type the answer here: