Skip to Content.
Sympa Menu

freetds - Correction on stored proc calls, was Re: Does anyone know what this packet means?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Craig Spannring <cts AT internetcds.com>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Correction on stored proc calls, was Re: Does anyone know what this packet means?
  • Date: Fri, 18 Sep 1998 18:05:12 -0700 (PDT)




I was mistaken about the parameter separators between parameters for
stored procedure calls. It should be more like-



The packet type in the 8 byte header is 0x03. The data in the packet
is-


1 byte variable 2 bytes variable variable variable
+----------------------------------------------+----------+ +--------+
| procname | procname | unknown1 | param1 | param2 | ... | paramN |
| length | | | | | | |
+----------------------------------------------+----------+ +--------+

The 2 unknown bytes seem to always be 0x00.

The parameters seem to be of the form

1byte 1byte 1 byte 1 byte 1 byte variable
+------+------+----------+-----------+--------+---------+
| 0x00 | 0x00 | variable | maximum | actual | data |
| | | length | possible | length | |
| | | datatype | length | | |
+------+------+----------+-----------+--------+---------+

or
1byte 1byte 1 byte
+------+------+----------+--------+
| 0x00 | 0x00 | fixed | data |
| | | length | |
| | | datatype | |
+------+------+----------+--------+

The datatype byte comes from the SYB* definitions in tds.h

The two 0x00 bytes at the beginning each parameter are somewhat
confusing. They seem to be a complete waste of data. Perhaps I'm
missing something here.


--
=======================================================================
Life is short. | Craig Spannring
Ski hard, Bike fast. | cts AT internetcds.com
--------------------------------+------------------------------------
Any sufficiently perverted technology is indistinguishable from Perl.
=======================================================================




Archive powered by MHonArc 2.6.24.

Top of Page