Results 1 to 2 of 2
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    trsafering access record in sql data base... (2000 sr-1)

    Assumig i have acces my_db.md and my_mdb.mdf (in instace named DVD377-14D9E48CSQLEXPRESS)
    Access mdb have table named my_table with:

    field1
    field2
    field3

    i have same table named my_table in sql instance with same named record and same property of access mdb

    i want to transfer all record from access table in sql db, record by record...

    similiar:

    rs.recorset1 of access in rs.recorset1 of sql db
    rs.recorset2 of access in rs.recorset2 of sql db
    rs.recorset3 of access in rs.recorset3 of sql db


    ...ecc

    record by record becose during the export from access to sql i make various operation on single record...

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: trsafering access record in sql data base... (2000 sr-1)

    I'd use ADO. You already have code using ADO to transfer records from Excel to a database or vice versa, so you should be able to adapt that.
    You'd use two ADODB.Connection objects - one for the Access database and one for the SQL Server database.
    And two recordset objects: one for the Access table and one for the SQL Server table.
    Loop through the Access recordset, and use AddNew to add a new record to the SQL Server recordset.

Posting Permissions

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