Results 1 to 2 of 2
2007-01-13, 12:18 #1
- Join Date
- Jan 2004
- 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:
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...
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
record by record becose during the export from access to sql i make various operation on single record...
2007-01-13, 14:45 #2
- Join Date
- Mar 2002
- Thanked 30 Times in 30 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.