Skip to Content.
Sympa Menu

freetds - Re: Example source codes

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.oit.unc.edu>
  • Subject: Re: Example source codes
  • Date: Mon, 30 Aug 1999 13:10:15 -0700 (PDT)


Tom Poindexter writes:
> On Mon, Aug 30, 1999 at 03:41:20PM -0400, Brian Bruns wrote:
> >
> > Text and image types are likely to be a problem in dblib, the TDS layer
> > works ok, but dblib has no support for them. I'll see if I can look
> > into it this week. (Anyone have some dblib sample code using text/image
> > to
> > play with?)
>
> Sybtcl has text/image code if you're interested. The basic ideas come
> from Sybase sample code. DB-Lib require some specific coding steps, along
> with mucking with text pointers and timestamps.

Note that for retrieval you don't need to do anything special (at the
client level). For example, sybperl does:

type = dbcoltype(dbproc, col);
len = dbdatlen(dbproc,col);
data = (BYTE *)dbdata(dbproc, col);

and then simply copies the contents of 'data' for TEXT or IMAGE
datatypes.

Client Library (and possibly DBlibrary's dbbind()) should convert
IMAGE datatypes to the hex string representation. TEXT datatypes
should be returned as is.

Then in addition there are text/image functions, such as dbreadtext(),
dbmoretext(), dbwritetext(), ct_get_data(), ct_send_data() and maybe
one or two others.

Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler AT peppler.org -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: ase-linux-list AT isug.com




Archive powered by MHonArc 2.6.24.

Top of Page