Re: "Data conversion resulted in overflow" with float constants

arielCo <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAMvU69KBduSeyrB5VsgZSaZz81Z7AC+miaL72z9-SUuKgr_QLA@mail.gmail.com>
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 <[email protected]> wrote:
> On Thu, Jun 13, 2013 at 6:06 PM, James K. Lowden <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.