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: arielCo <arielco AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] "Data conversion resulted in overflow" with float constants
  • Date: Fri, 21 Jun 2013 18:14:10 -0430

James, I substituted dbwillconvert() successfully in the 0.91 tarball,
but in Git it now boolean-izes the result of tds_willconvert:
return tds_willconvert(srctype, desttype) ? TRUE : FALSE;
Which makes more sense given the function name, but dbwillconvert
remains a scalar.

Since there are three mostly-redundant switch statements, and the one
in tds_willconvert is almost complete, maybe:
* have a single switch statement in, say, get_printable_size(type,size)
* _get_printable_size(colinfo) would be a wrapper
* tds_willconvert(srctype, desttype) calls get_printable_size(),
perhaps mapping SYBINTN to SYBINT8 since the size doesn't matter
* dbwillconvert stays a wrapper
* both *willconvert() functions return a boolean

Whaddyathink? (:

Ariel Cornejo
+58·412·8083546


On Fri, Jun 14, 2013 at 10:00 PM, arielCo <arielco AT gmail.com> wrote:
> On Thu, Jun 13, 2013 at 6:06 PM, James K. Lowden <jklowden AT freetds.org>
> wrote:
>> The right thing to do -- your mission, should you choose to accept it
>> -- is to use tdswillconvert() instead to determine the size.
> Challenge accepted. I'll keep you posted.
>
>
> Ariel Cornejo
> +58·412·8083546
> +58·416·6189113




Archive powered by MHonArc 2.6.24.

Top of Page