How can I perform SqlBulkCopy (equivalent) using ODBC connection in C #?

I am working on a project where I need to extract data from an MSSQL database table and then insert the data into a table of the same structure on AS400.

SqlBulkCopy would be an ideal candidate for this operation, but with an error (understandable) as the AS400 uses an ODBC connection.

Any help or suggestions on this would be greatly appreciated!

thank

+2


source to share


1 answer


If this is a one-time task, I would just extract the data from MSSQL to a CSV file. Then drop the CSV file into the IFS folder on the AS / 400 and then use CPYFRMIMPF. You may need to play games with date format according to AS / 400 formats. You can specify date and time formats and delimiters with the CPYFRMIMPF command.



If this is to be a repeatable task, I hope someone has a better answer.

0


source







All Articles