Hi, I try to bind a MySQL Table.
I'm using following:
1. Connection to my MySQL DB with:
2. Connecting 1 MySQL table:
3. binding to a textbox
no problems till here
now, if I change the context of 'Info' it should be written into my MySQL-Table - but it ain't.
Following code I tried:
4. Triggert on a simple Buttonevent
But nothing happens - the value in my MySQL-Table is still the same as before. It seems, that 'changes' is 'Nothing' - why - where is my bug?
thanks for helping
KrZa
I'm using following:
1. Connection to my MySQL DB with:
VB.NET:
connStr = ...
conn = New MySqlConnection(connStr)
conn.Open()
2. Connecting 1 MySQL table:
VB.NET:
Dim daten_diverses As DataTable
Dim da_daten_diverses As MySqlDataAdapter
Dim cb_daten_diverses As MySqlCommandBuilder
daten_diverses = New DataTable
da_daten_diverses = New MySqlDataAdapter("SELECT * FROM daten_diverses, conn)
da_daten_diverses.Fill(daten_diverses)
3. binding to a textbox
VB.NET:
Forms.Form1.Info.DataBindings.Add("Text", daten_diverses, "Info")
no problems till here
now, if I change the context of 'Info' it should be written into my MySQL-Table - but it ain't.
Following code I tried:
4. Triggert on a simple Buttonevent
VB.NET:
Dim changes As DataTable = daten_diverses.GetChanges()
If Not changes Is Nothing Then
da_daten_diverses.Update(changes)
daten_diverses.AcceptChanges()
End If
But nothing happens - the value in my MySQL-Table is still the same as before. It seems, that 'changes' is 'Nothing' - why - where is my bug?
thanks for helping
KrZa