Page 1 of 1
I can´t load Data
Posted: Wed 16 Mar 2005 14:38
by Guest
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

Posted: Wed 16 Mar 2005 15:18
by Serious
Please see DataSet and DbTable samples (you can find it in MySqlDirect .NET installation folder).
Posted: Thu 17 Mar 2005 16:42
by Guest
Hello,
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
Posted: Fri 18 Mar 2005 11:59
by Serious
We are using .NET Framework v2.0.40607 to build and test corresponding version of MySQLDirect .NET. Probably you are using another version of Microsoft ® .NET Framework 2.
We plan to perform testing of our product with other versions of .NET Framework 2 in the nearest future.
Posted: Fri 18 Mar 2005 13:19
by Guest
Hello,
Now, I have load the Sample "SetData" and I see, the data from the Table "users" are loaded.
But now in My Projekt it doesnt work.
Can you help me, please?
The Connection with "MySQLConnection1" works!
I have a Connection open.
And now i want to load Data from users!
Thank you
Posted: Fri 18 Mar 2005 15:48
by Serious
If DataSet demo sample suits you to some point you can use it as you wish adding the needed functionality.