Skip to Content.
Sympa Menu

freetds - Re: [freetds] "Data conversion resulted in overflow" with float constants

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] "Data conversion resulted in overflow" with float constants
  • Date: Wed, 12 Jun 2013 20:16:21 -0400

On Wed, 12 Jun 2013 17:56:32 -0430
arielCo <arielco AT gmail.com> wrote:

> 1>> select 100.0 foo
> 2>> go
> foo
> ---
> DB-LIBRARY error:
> Data conversion resulted in overflow
> Operating-system error:
> Error 0
> ---
>
>
> Apparently I can't write a literal float with more than four
> characters. Furthermore, I can't write any decimals without a column
> alias (fourth query above).

Hmm, that shouldn't happen. DB-Library shouldn't connect using a
version of the TDS protocol that might return datatypes it can't
interpret. (I doubt the alias matters, btw.)

It's fine to connect with a version older than the latest one
supported by the server. If you connect, say, with TDS 4.2 to a
modern SQL Server and select a BIGINT, the server will return it on
the wire as a VARCHAR. What appears to be happening here is
different: fisql appears to be connecting with TDS 7.something, and is
then flummoxed by the returned type. Or there's a bug in fisql in how
it binds/converts.

Try this:

$ export TDSDUMP=./dump
$ fisql ....
$ less dump

and look for two things:

1. Near the top of the file, it will say what version of the TDS
protocol is being used for the connection.

2. Near the bottom of the file, it will say what conversion was
requested and failed.

That should shed some light.

--jkl





Archive powered by MHonArc 2.6.24.

Top of Page