Results 1 to 8 of 8

Thread: table copy

  1. #1
    Join Date
    Oct 2003
    Posts
    6

    Talking Unanswered: table copy

    it's possible copy a table from a database to other with sql?

  2. #2
    Join Date
    Sep 2003
    Location
    T.O.
    Posts
    326
    DAO or ADO?
    All code ADO/ADOX unless otherwise specified.
    Mike.

  3. #3
    Join Date
    Oct 2003
    Posts
    6
    ADO and ADO.net

  4. #4
    Join Date
    Sep 2003
    Location
    T.O.
    Posts
    326
    Sorry, you only want to use SQL, right? No ADO coding?

    I can help you using recordsets, but not quite sure how to link to an external db using only SQL with Access.
    All code ADO/ADOX unless otherwise specified.
    Mike.

  5. #5
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    yes there is

    SELECT TblOriginal.* INTO TblCopy
    FROM TblOriginal


    NOTE : be sure both have the same column name

  6. #6
    Join Date
    Sep 2003
    Location
    T.O.
    Posts
    326
    Marvels, I'm pretty sure that will only work if TblCopy or TblOriginal is a linked table into the other database.

    I thought what was being asked here assumed the table wasn't linked?

    Paulo, can you be a little more specific on this point?
    All code ADO/ADOX unless otherwise specified.
    Mike.

  7. #7
    Join Date
    Oct 2003
    Posts
    6

    Talking

    sorry, i have 2 database's:

    Database A
    Database B

    In database A have table TabA
    In database B have table TabB

    I want to copy TabA from database A to database B using ADO or ADO.NET, so database become with 2 tables:

    TabB and TabA

    and not less important, thank for your help.

  8. #8
    Join Date
    Sep 2003
    Location
    T.O.
    Posts
    326
    You can use DoCmd.TransferDatabase and make the AcObjectType acTable, you don't really need ADO.

    If you're going to use ADO, you'll need to set up table objects and pick up the one you want to copy and append it to the target database's tables collection. DoCmd is much easier.
    All code ADO/ADOX unless otherwise specified.
    Mike.

Posting Permissions

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