[freetds] libdbi driver, some questions
Lowden, James K
LowdenJK at bernstein.com
Thu Aug 25 09:17:06 EDT 2005
> 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
> 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
> 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)
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?
> 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
> 7. And how can I convert MONEY and DATATYPE types to othet formats?
HTH. How is it going?
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,
More information about the FreeTDS