odbc and bcp

This is a discussion on odbc and bcp within the Windows Programming forums, part of the Platform Specific Boards category; Hi all,
I am trying to write a bulk copy utility through the ODBC interface. So far, I am able ...

odbc and bcp

Hi all,

I am trying to write a bulk copy utility through the ODBC interface. So far, I am able to export table information to a data file in native format by using bcp_init and bcp_exec. However, I can't seem to import data from the data file into a table. The failure seems to occur at the first stage, where I specify DB_IN for bcp_init. I am new to ODBC/bcp programming, so any help would be greatly appreciated. Here is the snippet of c++ code that the program doesn't seem to like: