Hi,
I have installed an mysql Server on my PC.
than i have installled Mysql Direct!
On a new form i have load "Mysql Connection 1".
When i test the connection, it came "Successfully connected".
I have the table "users" in my Database! I want to read all data in this table.
How i can make it?
( sorry for my bad englisch )
Thanks
I can´t load Data
Hello,
Now i Have this:
The Problem is, "MySqlException" becomes the error:
what can i do?
Thanks
Now i Have this:
Code: Select all
Imports CoreLab.Mysql
Public Class Form1
Inherits System.Windows.Forms.Form
Friend Connection As MySqlConnection
Friend Retries As Integer = 3
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
Private Sub btConnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btConnect.Click
Connection.Close()
Connection.UserId = TextBox1.Text
Connection.Password = TextBox2.Text
Connection.Host = TextBox4.Text
Connection.Port = Convert.ToInt32(TextBox5.Text)
Connection.Database = TextBox3.Text
Try
Connection.Open()
DialogResult = DialogResult.OK
Catch Exc As MySqlException
Retries = Retries - 1
If Retries = 0 Then
DialogResult = DialogResult.Cancel
End If
Select Case Exc.Code
Case 1045
ActiveControl = Connection.Password
Case 2003
Case 2005
ActiveControl = Connection.Host
End Select
Throw
End Try
End Sub
End Class
The Problem is, "MySqlException" becomes the error:
Code: Select all
Error3 Reference required to assembly 'System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' containing the base class 'System.Data.Common.DbException'. Add one to your project. C:\Dokumente und Einstellungen\Stephan\Lokale Einstellungen\Anwendungsdaten\Temporary Projects\WindowsApplication1\Form1.vb 27 21
what can i do?
Thanks