Binding and update problem

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Oufti
Posts: 24
Joined: Wed 10 May 2006 11:29

Binding and update problem

Post by Oufti » Fri 12 May 2006 18:05

Hello,

With the latest trial version. I'd like do this, bind some textbox to some fields of a table, when I do a change, I'd like to accept the change (update) when I click on a button. In theory it's easy, but that's not work or I do something wrong.

I see the record in the textbox, but no update possible.

Code: Select all

ds = new DataSet();
da = new CoreLab.MySql.MySqlDataAdapter("SELECT * FROM t_test", myconn);
cb = new CoreLab.MySql.MySqlCommandBuilder(da);
da.Fill(ds);
textBox1DataBindings.Add("text", ds.Tables[0], "TEST_FIELD");
textBox2.DataBindings.Add("text", ds.Tables[0], "TEST_FIELD2");
In the onclick event :

Code: Select all

da.Update(ds);
The record is never saved. In this table, there is only one record.

Do you have an idea why ?

Thanks,

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 15 May 2006 07:11

Please take a look at the following topic:
http://crlab.com/forums/viewtopic.php?p=12073#12073

Post Reply