Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
I have an sql server 2008 database with 2 tables, a master (Table_1) and a detail (Table_2). I have created an application (windows forms) in vb .net 2008, I used ado (sqldataadapter, sqlconnection, dataset), 1st adapter (sqldatadapter1) added the master table and second adapter (sqldatadapter2) added the detail. I have right click in the adapters and generated the same dataset (dataset1). I opened the dataset1 (double click) and view the 2 tables, I dragged from the master pk to the detail fk the mouse and created the relationship (sorry for the long description). In the detail I have an image field so I cannot make a master/detail datagrid, I have to have seperated textboxes for the master and a picturebox for the detail. My problem is when I move to the next record of the detail
Me.BindingContext(DataSet21, "Table_2").Position = (Me.BindingContext(DataSet21, "Table_2").Position + 1)
I move to the next id of the master, I want to move to the next detail record of the same master record, how can I do that programmatically? or do I have to write an sql select command string with an INNER JOIN?
Thank you
Posted 4-Feb-13 23:44pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 245
1 Jochen Arndt 155
2 PIEBALDconsult 150
3 Afzaal Ahmad Zeeshan 120
4 DamithSL 115
0 OriginalGriff 5,695
1 DamithSL 4,591
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190

Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100