vishal
11-27-2001, 06:30 PM
I need to find a way that i can export a newly inserted row from Access table to a SQL server database.
So something like a macro or something that executes some VB code on every new insert of row.
Please please help with some ideas.
The_Doc_Man
11-28-2001, 04:58 AM
Your problem is that you cannot always tell that a new row has been inserted. It depends on how it got there. If a form was involved, it is easy - use an event routine. But in table view, or during some import operations, no event code is loaded to detect the change or to be triggered by the change.
My best guess at this is to put a marker, maybe just a Yes/No flag, in each row with a default of No. Call it "Exported."
Run a query every so often to test for rows with Exported = No. Send them where you want them. Then reset the Exported flag.
This would allow you to force a refresh of the row to your remote server simply by resetting the Exported flag.
Think of the MS Windows "Archive" property and you've got the picture.
As to how you trigger this query to be run every so often, that is a tougher call.