freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Lowden, James K" <LowdenJK AT bernstein.com>
- To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] ct_options
- Date: Wed, 12 Feb 2003 10:57:41 -0500
> From: Castellano, Nicholas [mailto:Nicholas_Castellano AT acml.com]
> Sent: February 12, 2003 9:22 AM
>
> Have a look at my dbsetopt()/dbclropt()/dbisopt() implementation for
> DB-Library.
Well, that's certainly easy, but I had in mind the hard way, implementing
the 5.0 packet.
What I'm puzzled about is pretty fundamental. I don't understand the bowels
of libtds very well, but afaict it's a big jump table, where each sending
function blocks on a read if it expects an answer.
When I send TDS_OPT_SET or TDS_OPT_DEFAULT, the server issues an
acknowledgement with TDS_DONE(FINAL). The error bit is set in the TDS_DONE
if the option request was not processed successfully. I request an option
with TDS_OPT_LIST, answered by the server with a
TD_OPT_INFO packet.
Someplace I have to say, "Look for the answer and tell me what it is, so I
can respond to the user. I can't return from ct_options() until I hear back
from the server.
I suppose I can send the packet, call tds_process_default_tokens(), have it
look for the response token and return, whereupon I read the packet with
tds_get_byte() and friends. Is that the way it's done?
> (Also, it might be a good idea to call it tds5_send_optioncmd().)
Good point. Thanks.
--jkl
> -----Original Message-----
> From: freetds-admin AT lists.ibiblio.org
> [mailto:freetds-admin AT lists.ibiblio.org]
> Sent: Wednesday, February 12, 2003 1:33 AM
>
> I don't know how to go about reading from the server, having
> sent what I
> need. Also, I don't know what our "preferred" functions are.
> What's the
> highest level interface I can use?
>
> Also, I don't know if the options token exists in anything
> besides TDS 5.
> I'm assuming not.
>
> If someone who knows how could plunk a few comments in the
> code or rough
> out for me what to do, I think I could have this working in a
> day or so.
>
The information contained in this transmission may contain privileged and
confidential information 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.
-
[freetds] ct_options,
James K. Lowden, 02/12/2003
- <Possible follow-up(s)>
- RE: [freetds] ct_options, Castellano, Nicholas, 02/12/2003
- RE: [freetds] ct_options, Lowden, James K, 02/12/2003
Archive powered by MHonArc 2.6.24.