CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: ADODC

  1. #1
    Join Date
    Apr 2001
    Posts
    33

    ADODC

    i currently using ADODC as calling my database. i facing a problem when i need to call 2 table data and displayed at same data grid table. the 2 tables datas and fields are same. currently, i write my sql at SQL COMMAND text box as provide at the ADODC properties. please assits me for the problem. here is my current sql command SELECT "DATA" FROM TABLE_NAME. HOW TO ADD ANOTHER TABLE.

    Regards,
    Wilson Chai

  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: ADODC

    If I get it right you just want all the records of table1 and table2, then you can use the SQL UNION statement:

    SELECT * FROM table1
    UNION
    SELECT * FROM table2

    If table1 looks like this
    "test1"
    "test2"

    and table2 looks like this
    "test4"
    "test5"

    the result looks like this:
    "test1"
    "test2"
    "test4"
    "test5"


    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured