petermeachem
Programmer
I have an Access 2003 front end and sql 2000 holding the data.
We want a test database so I found some code (on tek-tips) to switch between live and test. thread700-676288
This looks just fine, the data looks right, the connection field in msysobjects is correct.
However.
One thing I needed to do was to import some csv files, so I changed from live to test. Then the data was deleted.
currentdb.Execute "DELETE * FROM " & rsCurFile!sTableName
and then new data copied in using TransferText.
This didn't work and I saw that the data was being deleted from the live database and then an attempt was made to append the data to the table in the test database.
Almost as though currentdb is still connected to the live database and not the test one.
How weird is that? If that is what is happeneing, how can I fix it, otherwise what is going on?
We want a test database so I found some code (on tek-tips) to switch between live and test. thread700-676288
This looks just fine, the data looks right, the connection field in msysobjects is correct.
However.
One thing I needed to do was to import some csv files, so I changed from live to test. Then the data was deleted.
currentdb.Execute "DELETE * FROM " & rsCurFile!sTableName
and then new data copied in using TransferText.
This didn't work and I saw that the data was being deleted from the live database and then an attempt was made to append the data to the table in the test database.
Almost as though currentdb is still connected to the live database and not the test one.
How weird is that? If that is what is happeneing, how can I fix it, otherwise what is going on?