Skip to Content.
Sympa Menu

freetds - RE: [freetds] RPC/Packet Type 3 Format

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] RPC/Packet Type 3 Format
  • Date: Thu, 17 Jul 2003 17:37:30 -0400

> From: lists-tds AT mymailfilter.net [mailto:lists-tds AT mymailfilter.net]
> Sent: July 17, 2003 4:52 PM
> >
> > N'your stuff here'
>
> Quite right, my example didn't show the characters. Yet,
> your response
> indicates what I should know to be true: the parameter types
> MUST be known
> somehow, so the N' can be inserted. Correct? If so, are the
> parameter types sent BEFORE the procedure call or with it?

We use sp_executesql, which provides enough explicit information for the
server to construct a stored procedure temporarily. All of its character
parameters use Unicode data.

The ADO driver undoubtedly has intimate knowledge of the server's
expectations and requirements, as well as type information for the
parameters and constants. I should think it could easily decide what to
convert to (or cast to) Unicode.

> > > And finally, there is a bit of a "trailer" on the end of each
> > > packet.
> >
> > 0120 00 74 00 0d 00 0a 00 00 00 26 04 04 01 00 00 00
> > \0 t \0 CR \0 LF \0 \0 ?? ?? ?? ^^ ^^ ^^^^^ ^^
> > | | | 3 more?
> > | | + length=0
> > | + final
> > + Response packet
> >
> > I see a CR/LF pair, a null terminator (or so), two unknown
> > bytes, and a server response. I think.
>
> What is your reference to "3 more?"

It looks suspiciously like a server response, so I hypothesized that there
should be three more bytes following that last zero (which would form a
complete and reasonable reponse).

> this packet was definitely on the wire going TOWARD
> the server.

Then I'm probably wrong. AFAIK, type 4 packets are never sent to the
server.

Your dump shows the packet size is 0xFA. I'm pretty sure that starts with
the 0x03; if so, that would include your "trailing bytes", ending with 12F.
Just as you said.

Another interpretation, pure speculation: 26 is a subpacket type of some
kind, followed by bitmapped status of 04, a length of 4, and a four-byte
status word or something. It will be interesting to see how they dance as
you try different variations of the theme.

--jkl
-----------------------------------------
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.






Archive powered by MHonArc 2.6.24.

Top of Page