freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Lowden, James K" <LowdenJK AT bernstein.com>
- To: "'TDS Development Group'" <freetds AT franklin.metalab.unc.edu>
- Subject: dbdatlen with STRINGBIND
- Date: Fri, 12 Jul 2002 18:10:58 -0400
Bill,
I happen to be working at work with MS dblib, and came across some behavior
I'm surprised about. You might want to look at it yourself.
I'm working with datetime fields, where dbbind() was called with STRINGBIND,
so I get a null-terminated string in the default format representing the
date. It works fine; I get the date string sure enough, right as rain.
Interesting thing is, it seems dbdatlen() returns, not the string length, as
I'd expect, but 8! That's the size of the DBDATETIME structure. It appears
that in some cases at least when dblib converts datatypes for binding
purposes, dbdatlen() will return the size of the transmitted data rather
than that of the converted, bound data.
Please don't take my word for it; I'm looking at it closer for the next hour
or so at least. But I'm sure enough so far that I thought I should warn
you.
--jkl
-
dbdatlen with STRINGBIND,
Lowden, James K, 07/12/2002
- <Possible follow-up(s)>
- Re: dbdatlen with STRINGBIND, Michael Peppler, 07/12/2002
Archive powered by MHonArc 2.6.24.