[freetds] "error_handler: Data-conversion resulted in overflow"

James K. Lowden jklowden at freetds.org
Tue Sep 26 22:24:54 EDT 2006

Peter Matulis wrote:
> I currently have a Linux system successfully performing SELECT queries
> on a MS SQL Server 2000 system.  However, I notice that sometimes I
> get an error:
> "error_handler: Data-conversion resulted in overflow"
> I get this when I add a single column to a select statement.  That
> column has bigint as datatype.  

That would come from src/ctlib/cs.c, line 650.  It's a bit messy: it
writes to stderr instead of calling the client's error handler.  But it
gets the point across, I suppose.  

> Does anyone know why this is happening
> and how I can resolve it?

I think you're trying to convert a BIGINT to a string (possibly
implicitly, through binding).  The character buffer is not big enough.  

The conversion function that emits this message returns CS_FAIL.  That
should be passed back to your application.  



More information about the FreeTDS mailing list