Skip to Content.
Sympa Menu

freetds - Re: [freetds] libdbi driver, some questions

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] libdbi driver, some questions
  • Date: Thu, 25 Aug 2005 09:17:06 -0400

> From: Vadym Kononenko
> Sent: Tuesday, August 23, 2005 5:25 AM

I'm not a ct-lib expert, Vadym. But since no one else jumped in, let me
try.

> Could you say me how can I use direct acces to TDS struct without
> internal headers files. At this moment I use "ctlib.h" for access
> to:
> 1. (ctx->tds_ctx->locale->date_fmt) set data format.

You know of course this is controllable with locale.conf. I think you
want ct_options() and CS_OPT_DATEFORMAT.

> 2. (conn->tds_socket->s) - get socket descriptor.

I don't know how to get that with ct-lib. We could add a function to
the ct-lib definition. Could you tell me why you want it? ct-lib
should do all the socket management.

> 3. (conn->tds_login->client_charset)
> and
> (conn->tds_login->server_charset)

I doubt there is any access to this information from ct-lib. I think
there's support in the API definition for locale stuff, but I doubt it's
implemented in FreeTDS. Wouldn't be hard to add, though.

> 4. Should I free memory after call "ct_fetch()" function?

No.

> 5. When I sent "EXEC sp_tables" query to server I received'nt
> tables list. I receive 23 time database name. But through network
> sniffer I see that all tables list are received. And number of
> tables are 23.

That really sounds like a logic error in your program.

> 6. How can I get real length of received data? "datafmt.maxlength"
> show buffer size.

If you are using ct-bind(), see the "copied" and "indicator" output
parameters.

> 7. And how can I convert MONEY and DATATYPE types to othet formats?

cs_convert().

HTH. How is it going?

--jkl

-----------------------------------------
The information contained in this transmission may be privileged and
confidential and is intended only for the use of the person(s) named
above. If you are not the intended recipient, or an employee or agent
responsible
for delivering this message to the intended recipient, any review,
dissemination,
distribution or duplication of this communication is strictly prohibited. If
you are
not the intended recipient, please contact the sender immediately by reply
e-mail
and destroy all copies of the original message. Please note that we do not
accept
account orders and/or instructions by e-mail, and therefore will not be
responsible
for carrying out such orders and/or instructions. If you, as the intended
recipient
of this message, the purpose of which is to inform and update our clients,
prospects
and consultants of developments relating to our services and products, would
not
like to receive further e-mail correspondence from the sender, please "reply"
to the
sender indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New
York,
NY 10105.




Archive powered by MHonArc 2.6.24.

Top of Page