简体   繁体   中英

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

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM