Skip to Content.
Sympa Menu

freetds - Re: [freetds] DBD::ODBC::st fetchrow_hashref failed: [unixODBC][FreeTDS][SQL Server]Data truncated (SQL-01004)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] DBD::ODBC::st fetchrow_hashref failed: [unixODBC][FreeTDS][SQL Server]Data truncated (SQL-01004)
  • Date: Sat, 16 May 2009 16:04:37 -0400

Buurman, H.A. (Herbert) wrote:
> After upgrading to freeTDS 0.82-5 (debian testing), I'm suddenly
> getting these errors when fetching datarows from a prepared and executed
>
> query on an MSSQL server (v 9.0.2047) that I didn't get before.
> I Couldn't find anything about this in the archives
> (no, this is not related to the LongReadLen and LongTruncOK db-connect
> options). DBI version 1.607
> DBI::DBD version 12.010405
> DBD::ODBC version 1.21
> unixodbc version 2.2.11-16+b1
> TDS version used (in freetds.conf): 8.0
> text size (in freetds.conf): 64512

I would do two things. First, try to simplify the query and isolate the
column causing the problem. 

Second, if that does make the solution obvious, set the DBI trace level to
3 or 4, and TDSDUMP=stdout, and redirect the log output to a file. The
result will show your programs's output, the DBI trace, and the TDSDUMP,
all interleaved in time. You should see the ODBC error being provoked,
the data packets that arrived before it, and the metadata describing the
columns and each row. With luck, that will be enough.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page