freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] XA Transactions / Sending raw TDS packets through ODBC
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] XA Transactions / Sending raw TDS packets through ODBC
- Date: Thu, 13 Mar 2008 17:56:45 -0400
Laurence Rowe wrote:
> how can I send a raw TDS packet through the ODBC
> interface?
USTL!
You have access to the raw socket via the connection handle. It's just a
SMP to cast it to the right type, grab the descriptor, and write(2) your
packet. Is that what you're looking for?
Cf. INIT_HDBC in src/odbc/odbc.c:121. You will find that
HDBC is a TDS_DBC*
is a struct _hdbc* that
has a TDSSOCKET* named tds_socket that
is a struct tds_socket* that
has a TDS_SYS_SOCKET named s that
is probably just an int in tds_sysdep_public.h.
If there's a blessed ODBC way, I don't know about it.
> It seems the packets are very simple
Sure. The rest of the code is mostly comments and filler, as you can see.
;-)
HTH.
--jkl
-
[freetds] XA Transactions / Sending raw TDS packets through ODBC,
Laurence Rowe, 03/13/2008
- Re: [freetds] XA Transactions / Sending raw TDS packets through ODBC, James K. Lowden, 03/13/2008
Archive powered by MHonArc 2.6.24.