Click here to Skip to main content
12,823,823 members (47,830 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB SQL-Server ADO.NET , +
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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2017
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