Imports System.Data.OleDb
Public Class Form1
Dim conli As New OleDbConnection
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
conli.Open()
MsgBox("open database")
conli.Close()
Catch ex As Exception
MsgBox("nooooooooooooooooooo database")
End Try
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
conli.ConnectionString = "Provider=mysql;Data Source=localhost;User Id=root;Password=1234"
End Sub
End Class
Tag : .NET, MySQL, VB.NET
Date :
2011-11-20 17:08:24
By :
เบล
View :
1193
Reply :
4
No. 1
Guest
ว่า เขียน ConnectionString กับ mysql ของ appserv ถูกต้อง รือปล่าว