Results 1 to 8 of 8
  1. #1
    Lounger
    Join Date
    Apr 2001
    Location
    Rockvale, Tennessee, USA
    Posts
    42
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Multi Table Database (VB6 Professional Edition)

    I built a single table database that performed as hoped but when I tried to improve it using several tables [per data normalization rules] I had problems. How are TextBox/ComboBoxes bound to different tables and what about datacontrol, what table should that point to?

    John

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Multi Table Database (VB6 Professional Edition)

    You can have multiple data controls on the same form and bind the rowsource of different controls to different data controls.
    Charlotte

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Multi Table Database (VB6 Professional Edition)

    You can also bind a data control to a command object that uses multiple tables.
    Charlotte

  4. #4
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Multi Table Database (VB6 Professional Edition)

    It might be just me, but I've started to have problems with bound data controls when it gets complex.

    I find that, although it's more work to set up, I have far more control and flexibility by not using bound controls. For a multi-table situation, I'd just build the SQL to access allrequired tables, use ADO or DAO to query, and populate whatever controls manually.

    But of course, if I understood bound controls better, I could perhaps be using them to better effect.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  5. #5
    Lounger
    Join Date
    Apr 2001
    Location
    Rockvale, Tennessee, USA
    Posts
    42
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Multi Table Database (VB6 Professional Edition)

    Please explain.

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Multi Table Database (VB6 Professional Edition)

    You can create a command object based on a SQL statement that includes joined tables. You can also based a data control on a SQL statement that includes joined tables. I never work with the older data control, only the ADO version, but you can drop multiple data controls onto a form, so that you can use one for the form itself and another for the rowsource for a datacombo. Is that clearer?
    Charlotte

  7. #7
    Lounger
    Join Date
    Apr 2001
    Location
    Rockvale, Tennessee, USA
    Posts
    42
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Multi Table Database (VB6 Professional Edition)

    I think I too should be more specific in my request, or maybe you've told me and I'm still not grasping it.
    The Project:
    2-Tables, CarsPeopleDrive and Cars. Table "CarsPeopleDrive" has 2-columns, Names and Cars where column [Cars] reference the Models Column of Table "Cars"
    1-Form with2- ComboBoxes, 1 to display current record of Names and 1 to display the corresponding selected record from a dropdown list of Models from Table "Cars".
    Runtime updatable.

    Charlotte, if you have time could you work this sample project so that I can learn how it should be completed. John

  8. #8
    Lounger
    Join Date
    Apr 2001
    Location
    Rockvale, Tennessee, USA
    Posts
    42
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Multi Table Database (VB6 Professional Edition)

    Thanks for your input Geoff. Maybe you could help me work the sample that I'm about to post today ref: Tables VB6.


    John

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •