Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS API basic/newbe question

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Medi Montaseri" <medi AT resonate.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] FreeTDS API basic/newbe question
  • Date: Fri, 20 Apr 2007 10:40:41 -0700

Thank you
I am happy with this...

medi

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of James K. Lowden
Sent: Thursday, April 19, 2007 9:14 PM
To: FreeTDS Development Group
Subject: Re: [freetds] FreeTDS API basic/newbe question

Medi Montaseri wrote:
> What does FreeTDS API do...what are they good for...can someone give
> me a two paragraph use case and/or scenario...

libtds is a collection of low-level functions more than an API. The
closest thing you'll find to a packet parser is in src/tds/token.c.
You'll find it's highly specialized to reading a TDS stream and
populating TDSSOCKET structures. It recognizes tokens, parses packets,
and converts incoming wire-encoded data to something understandable by
the host.

The TDS protocol requires the client to maintain state information and
to stay synchronized with the server. For the most part, excepting bcp,
clients don't send much; the work lies in reading the stream. The
client doesn't know exactly what to expect -- it's not like reading back
a record from a file -- and isn't supposed to care very much about the
shared state information. So there's no function similar to fread(3),
where the client specifies a structure to be filled. Instead, there's a
structure-about-a-structure, a structure of metadata and another of
data, that libtds populates as the information is received.

If you're interested in more detail, I suggest you have a look at the
source code. Some of the comments and ancillary files might be helpful.


--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds




Archive powered by MHonArc 2.6.24.

Top of Page