mysql and visual studio HELP!!!!!

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
noodleweb
Posts: 4
Joined: Wed 07 Feb 2007 08:29

mysql and visual studio HELP!!!!!

Post by noodleweb » Tue 03 Apr 2007 20:13

ok so i can use this tool no problems to display data in a windows form
after creating a relationship i can even step through recordsets related from two tables
what i cannot figure out is how to update related tables
dragging fileds onto a form creates a binding navigator
i can navigate forwards and backwards no problems
but when i click new button because i have data fields from two tables in my form when i add data to the fields nothing gets saved
also if i press the save button in the binding navigator nothing happens
i am completely confused i tried doing this


private void propmainBindingNavigatorSaveItem_Click(object sender, EventArgs e)

{

this.prop2TableAdapter.Update(this.testdataDataSet.prop2);

this.propmainTableAdapter.Update(this.testdataDataSet.propmain);


nothing gets updated

why is this so complicated!!!!!

can some one explain

how i can dispaly related data on a form from several tables,

edit that data and then updATE the datatasets and actual database tables withouT writing a load of code



i am pulling my hair out

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

Post by Alexey » Fri 06 Apr 2007 10:48

If I got you right, you want to set up visual components so that they would make correct inserts for you. The task is sophisticated and cannot be implemented without coding. One of the way to accomplish it is to fire
Update on a parent table, receive inserted ID, pass it to the fields of a
child table and fire Update for it.

noodleweb
Posts: 4
Joined: Wed 07 Feb 2007 08:29

so can we have a code sample

Post by noodleweb » Sun 15 Apr 2007 19:36

can some supply a code sample i can copy an paste
please>>>

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

Post by Alexey » Mon 16 Apr 2007 15:34

Please take a look at our MasterDetail sample project.

Post Reply