Have 2 database in C:\ STAT_2016 and STAT_2017.
wth a vb6 code possible to select * from STAT_2016 WHERE anno='2017' and cut and append up STAT_2017?
note:
all database have the same table name
MOVE records from c\ to c:\
-
- Administrator
- Posts: 78512
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: MOVE records from c\ to c:\
Open an ADODB connection to the database in STAT_2016. First, execute the following SQL to append the records to the target table:
Then execute the following SQL to delete the records from the source table:
Substitute the correct names and paths.
Code: Select all
strSQL = "INSERT INTO TableName IN C:\STAT_2017\Database.mdb SELECT TableName.* FROM TableName"
Code: Select all
strSQL = "DELETE TableName.* FROM TableName"
Best wishes,
Hans
Hans