Export Table via ODBC to an AS400 using VBA

GregG

New member
Local time
Today, 11:42
Joined
Sep 20, 2001
Messages
5
Hello folks,

I know I could probably figure this out myself but I've got a deadline coming up.

Using the menu dropdowns and dialog boxes in Access 2000, I am easily able to export a table via ODBC to our AS400:

Click File/Export
Save as Type: ODBC Databases
Export tablename: tblAS400file
Click the "Select machine data source tab"
I then select Data Source Name: AS400SN

I need to automate this process with VBA code. Would someone be nice enough to supply me with what I need to do this?

Also, is it possible to delete the file from the AS400 prior to exporting it thus avoiding an error message?

Thanks very much!!!

Greg
 
Greg,

Look up Docmd.TransferDatabase

As for deleting the table I'm not sure.
 
Can you set up some sort of stored procedure on the 400 to delete the file? You could then call it with a pass through query and then do your transfer.
 

Users who are viewing this thread

Back
Top Bottom