Binding and update problem

Binding and update problem

Postby 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,
Oufti
 
Posts: 24
Joined: Wed 10 May 2006 11:29

Postby Alexey » Mon 15 May 2006 07:11

Please take a look at the following topic:
http://crlab.com/forums/viewtopic.php?p=12073#12073
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for MySQL