Skip to Content.
Sympa Menu

freetds - Re: dbdatlen with STRINGBIND

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Peppler <mpeppler AT peppler.org>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: dbdatlen with STRINGBIND
  • Date: 12 Jul 2002 17:28:15 -0700

On Fri, 2002-07-12 at 15:10, Lowden, James K wrote:
> 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!

This is normal.

dbdatlen() is for use with dbdata() - i.e. to fetch the raw data. If you
use dbbind() to convert the data from it's original format to (say) a
string, then dbdatlen() will not change its behavior.

Michael
--
Michael Peppler / mpeppler AT peppler.org / http://www.mbay.net/~mpeppler
mpeppler AT zetatools.com / ZetaTools, Inc / http://www.zetatools.com
ZetaTools: Call perl functions as Sybase stored procedures!

Attachment: signature.asc
Description: This is a digitally signed message part



  • 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.

Top of Page