[freetds] bulk library in ct-lib

Thompson, Bill D (London) bill_d_thompson at ml.com
Mon May 17 10:15:11 EDT 2004

Hi all,

I've just submitted my patch to ct-library for the "bulk library"

Mostly, its a stand-alone change, but I've changed the TDSCOLUMN structure,

column_timestamp - a bit indicating if the column is a SQL 2000 timestamp
bcp_column_data  - a pointer to a little structure which will hold (if
required) the data intended for bcp-ing into this column.

The ct-library bilk copy functions have a number of technical advantages
over its db-library counterpart.

1) They build a whole row of bcp data before sending anything down the wire.

    This is stored in TDSRESULTINFO->current_row, which is right-sized on

2) less memory allocation/deallocation

3) We can handle identity columns, and choose through the API whether we
want to load data into them or leave them to the server to derive

4) we can handle SQL 2000 timestamp columns, leaving the server to derive
new values for these when we bcp data into a table that contains them.

All of these advantages will be transferred into the db-library code in due
course, when I will create some underlying common code for them.

Thanks in advance to whoever applies my patch !

best wishes,


Bill Thompson
Securities Services Division
Merrill Lynch Europe

For very important information relating to this e-mail please click on this
link:  http://www.ml.com/legal_info.htm


If you are not an intended recipient of this e-mail, please notify
the sender, delete it and do not read, act upon, print, disclose,
copy, retain or redistribute it.

Click here for important additional terms relating to this e-mail.


More information about the FreeTDS mailing list