Results 1 to 5 of 5
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts
    note:
    I use tipical connection with ADO




    Admit have 2 table: table1 and table2
    In this 2 table have a 6 fileds with the same name
    The first filed for all 2 table named PROVA01 have a index.
    Now admit i update the value in records in table1 is possible to update automaticlly the same recordset in table 2 based index in PROVA01?

    Sorry for stupid question:-)
    I think is possible to link all fields/recordset from the 2 tables via vba and ADO.... boh??

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    If you always want the fields to have the same values, you don't need the fields in the second table - they are redundant.
    Instead, you can use a query based on the two tables, joined by PROVA01 to display the corresponding records.

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='796620' date='06-Oct-2009 17:37']If you always want the fields to have the same values, you don't need the fields in the second table - they are redundant.
    Instead, you can use a query based on the two tables, joined by PROVA01 to display the corresponding records.[/quote]

    Example please of join from 2 table... i know the way to join recodset into same table

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    It would be something like

    SELECT Table1.PROVA01, Table1.Field2, Table1.Field3, Table2.FieldA, Table2.FieldB
    FROM Table1 INNER JOIN Table2 ON Table1.PROVA01 = Table2.PROVA01

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='796648' date='06-Oct-2009 20:38']It would be something like

    SELECT Table1.PROVA01, Table1.Field2, Table1.Field3, Table2.FieldA, Table2.FieldB
    FROM Table1 INNER JOIN Table2 ON Table1.PROVA01 = Table2.PROVA01[/quote]

    wow!
    I dont know is possible to join 2 table...
    And i dont know the way table1.prova01 or table2.field3 is a very useful trp!
    Tks as usual.

Posting Permissions

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