[freetds] RE: multiple-row bindings (was: Problem with OTL & bulk insert)

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Fri Jul 30 07:54:25 EDT 2004

> Hello,
> Attached a simple little test program that is supposed to 
> batch-insert a number of rows.
> What's supposed to happen ( and works on Windows + ODBC ) is 
> that the insert statements are buffered in batches of 50 and 
> then send to the database.
> This saves 49 round-trips for every 50 inserts.
> Unfortunately this does not seem to work on freetds ( or not 
> implemented ). It seems to only insert the first one of every batch.
> If I change the buffer-size for the insert to 1, then it 
> works fine ( also the select statement with a buffer of 50 
> )... However this defeats the performance issue.
> Currently I am using version: freetds-0.63.dev.20040514.tgz
> attached are:
> - sample source code
> - odbctrace file
> - otlv4.h file
> ( ps I am using libiodbc-3.51.1 )
> Please advise if you need more information.
> Best regards
> Piet

First of all this has nothing to do with bulk insert.
It's related to multiple-rows binding. multiple-rows binding it's still
not supported under FreeTDS ODBC (support for multiple-row fetching it's
undergoing). Note that ODBC drivers are not beholden to support this
feature and client that do not support this are not ODBC compliant (as
otlv4 is...).
You are trying to use multiple-rows with parameters. This is not
supported (even enabling development code). Current CVS fix false
success returning SQL_ERROR however otlv4 fails...


More information about the FreeTDS mailing list