DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 1 of 1

Thread: problems with multiple related tables on a datagrid

  1. #1
    Join Date
    Apr 2005
    Posts
    17

    problems with multiple related tables on a datagrid

    Problem: The below will display: home_name, person_id, person_name, person_age, person_job
    field records with no problem. However when i re-create da1 to input tb3 & tb4 and select
    the company_name field to show on the datagrid as well, it doesnt display any records. The
    relationships are created in the MS access already and when i used data adapter query builder,
    the relationships are there as well, am i missing any steps?
    -
    Private Sub frmResults_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    'da1 is a data adapter that has 2 tables: tb1 & tb2
    'i used vs.net to drag the oledbdataadapter to select fields using sql query builder
    'the datagrid will show eg: home_name, person_id, person_name, person_age, person_job
    da1.Fill(ds)

    dataview = ds.Tables("tb1").DefaultView

    'dg is datagrid with dataview as DataSource
    dg.Datasource = dataview

    Table: Fields
    ------------
    tb1: home_id, home_name, home_type
    tb2: person_id, person_name, person_age, person_job
    tb3: company_id, person_id
    tb4: company_id, company name

    -
    any advise will be appreciated!
    Last edited by john83; 05-21-2005 at 11:03 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center