[freetds] Function sequence error from Linux => SQL Server 2000

Charles Bearden Charles.F.Bearden at uth.tmc.edu
Thu Apr 29 10:48:05 EDT 2004


> -----Original Message-----
> From: freetds-bounces at lists.ibiblio.org [mailto:freetds-
> bounces at lists.ibiblio.org] On Behalf Of ZIGLIO, Frediano, VF-IT
> ...
> >
> > Two final clues:
> > (1) If I use the Python interpreter to instantiate my DB
> > connection and
> > call the stored procedure with the same XML data, it loads
> > the data into
> > the target table with no complaint.
> > (2) In my script I create six or seven different connections to the
> > database, each with its own cursor, so that each cursor executes
only
> > one thing on the SQL server.  My hope was to reduce overhead by
> > permitting each cursor to prepare just one statement.  Now that the
> > cursors are executing stored procedures rather than SQL statements,
> > perhaps I should use only one connection and cursor.
> >
> ...
> 
> Strange... I tested with latest sources (mxBase-2.0.5 and
> mxCommercial-2.0.6) and I founded this code:
> 
>            if (var->data_len < 256)
>                 var->sqltype = SQL_CHAR;
>             else
>                 var->sqltype = SQL_LONGVARCHAR;
> 
> (both iOBDC and unixODBC).
> For long data my test code use (correctly) TEXT and data got send to
> server correctly. Log you sent seem to use SQL_CHAR instead...

I find the same code starting at line 4066 of mx/ODBC/iODBC/mxODBC.c in
my source as well.

Chuck



More information about the FreeTDS mailing list