Skip to Content.
Sympa Menu

freetds - Re: [freetds] bcp_bind vartype = 0

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: craigberry <craigberry AT mac.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] bcp_bind vartype = 0
  • Date: Mon, 21 Jun 2010 13:04:16 -0700 (PDT)



On Jun 21, 2010, at 01:03 PM, Gil Rohde <grohde AT yahoo.com> wrote:

In Sybase, setting the bcp_bind vartype parameter to 0 tells it not to
perform any conversion on the datatype.

FWIW, Microsoft documents the same behavior:

http://msdn.microsoft.com/en-us/library/ms131401.aspx

With freetds this seems to cause a failure since it attempts to convert it
with dbconvert and doesn't recognize a source type of 0.

Is this a known and recognized difference or bug? It looks like one way to
handle this is to modify dbconvert to treat a source type of 0 as the same as
the dest type.

It looks like a bug. dbconvert() does have special handling for the source
type and destination type being the same, and since this is really a subset
of that, it could probably be added to it. It might be as simple as saying

if (!srctype) srctype = desttype;

somewhere near the top of dbconvert().





Archive powered by MHonArc 2.6.24.

Top of Page