Bulk copy (C API) and ODBC driver for SQL Server

bcp c++ odbc sqlbulkcopy

Question

I'm trying to use the ODBC bulk copy API with SQL Server: bcp_init, bcp_bind, bcp_sendrow, .... in a C++ program

I don't know what is the latest driver and what I should link against?

I've tried the "SQL Server" driver and linking against odbcbcp.lib. It works (almost) but the driver is quite old and seems to have some bugs

I've tried to move to "ODBC Driver 13 for SQL Server" but the bulk copy functions don't work. I guess it's because I'm not linking against the right dll. Does someone know, what I should link against?

Popular Answer

Found it. It's possible when installing the driver to install also the SDK. It will be in C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\XX-version-XX



Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why