freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] "Data conversion resulted in overflow" with float constants
- From: David Chang <dchang AT fsautomation.com>
- To: freetds AT lists.ibiblio.org
- Subject: Re: [freetds] "Data conversion resulted in overflow" with float constants
- Date: Wed, 12 Jun 2013 17:04:01 -0700
Ariel,
In your freetds.conf file, did you set the tds version to 8.0? For example:
[DBMS1]
host = 192.168.1.1
port = 1433
tds version = 8.0
I tried your statements using my own DB-Library program (not fisql) and they all worked fine. I did this against SQL Server 2012, SQL Server 2008 R2, and SQL Server 2005. I don't have a copy of SQL Server 2008.
DC
On 6/12/2013 3:26 PM, arielCo wrote:
I'm getting these errors with FreeTDS 1.91 against SQL Server 2008
which I can't make sense of:
$ ~/freetds/bin/fisql -S prueba -U ariel
Password:
1>> select 1.1 foo
2>> go
foo
---
1.1
(1 rows affected)
1>> select 1.11 foo
2>> go
foo
---
1.11
(1 rows affected)
1>> select 1.111 foo
2>> go
foo
---
DB-LIBRARY error:
Data conversion resulted in overflow
Operating-system error:
Error 0
---
(1 rows affected)
1>> select 1.0
2>> go
DB-LIBRARY error:
Data conversion resulted in overflow
Operating-system error:
Error 0
(1 rows affected)
1>> select 99.0 foo
2>> go
foo
---
99.0
(1 rows affected)
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).
Since I'm a complete MS SQL newbie, I tried the example provided in
the Transact-SQL documentation and it fails too:
1>> DECLARE @myval decimal (5, 2)
2>> SET @myval = 193.57
3>> SELECT CAST(CAST(@myval AS varbinary(20)) AS decimal(10,5))
4>> go
(1 rows affected)
DB-LIBRARY error:
Data conversion resulted in overflow
Operating-system error:
Error 0
Am I doing something terribly wrong? These work in SQL Server Management
Studio.
Thanks in advance,
ariel cornejo
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
-
[freetds] "Data conversion resulted in overflow" with float constants,
arielCo, 06/12/2013
- Re: [freetds] "Data conversion resulted in overflow" with float constants, James K. Lowden, 06/12/2013
-
Re: [freetds] "Data conversion resulted in overflow" with float constants,
David Chang, 06/12/2013
-
Re: [freetds] "Data conversion resulted in overflow" with float constants,
arielCo, 06/13/2013
- Re: [freetds] "Data conversion resulted in overflow" with float constants, Frediano Ziglio, 06/13/2013
-
Re: [freetds] "Data conversion resulted in overflow" with float constants,
James K. Lowden, 06/13/2013
-
Re: [freetds] "Data conversion resulted in overflow" with float constants,
arielCo, 06/14/2013
-
Re: [freetds] "Data conversion resulted in overflow" with float constants,
arielCo, 06/21/2013
-
Re: [freetds] "Data conversion resulted in overflow" with float constants,
James K. Lowden, 06/26/2013
- Re: [freetds] "Data conversion resulted in overflow" with float constants, arielCo, 06/27/2013
- Re: [freetds] "Data conversion resulted in overflow" with float constants, James K. Lowden, 06/27/2013
-
Re: [freetds] "Data conversion resulted in overflow" with float constants,
James K. Lowden, 06/26/2013
-
Re: [freetds] "Data conversion resulted in overflow" with float constants,
arielCo, 06/21/2013
-
Re: [freetds] "Data conversion resulted in overflow" with float constants,
arielCo, 06/14/2013
-
Re: [freetds] "Data conversion resulted in overflow" with float constants,
arielCo, 06/13/2013
Archive powered by MHonArc 2.6.24.