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: <lists-tds AT mymailfilter.net>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] RPC/Packet Type 3 Format
  • Date: Fri, 18 Jul 2003 10:06:28 -0500 (CDT)

Here are a few more with some different initialization and param
type(s)...

declare @a char(1)
set @a = 'x'
exec foo @a output
------------------
0000 00 08 7c c2 42 c2 00 03 47 8b 23 05 08 00 45 00 ..|.B...G.#...E.
0010 00 d4 80 fa 40 00 80 06 23 7d 0a 00 2c 4c 0a 00 ....@...#}..,L..
0020 15 61 07 e3 05 99 ea 2b ac 4b bf e3 87 ab 50 18 .a.....+.K....P.
0030 f7 46 44 90 00 00 03 01 00 ac 00 00 01 00 ff ff .FD.............
0040 0b 00 00 00 00 01 26 04 04 ff ff ff ff 00 00 63 ......&........c
0050 00 00 00 00 09 04 00 01 32 ff ff ff ff 00 00 63 ........2......c
0060 6c 00 00 00 09 04 00 01 32 6c 00 00 00 64 00 65 l.......2l...d.e
0070 00 63 00 6c 00 61 00 72 00 65 00 20 00 40 00 61 .c.l.a.r.e. .@.a
0080 00 20 00 63 00 68 00 61 00 72 00 28 00 31 00 29 . .c.h.a.r.(.1.)
0090 00 0d 00 0a 00 73 00 65 00 74 00 20 00 40 00 61 .....s.e.t. .@.a
00a0 00 20 00 3d 00 20 00 27 00 78 00 27 00 0d 00 0a . .=. .'.x.'....
00b0 00 65 00 78 00 65 00 63 00 20 00 66 00 6f 00 6f .e.x.e.c. .f.o.o
00c0 00 20 00 40 00 61 00 20 00 6f 00 75 00 74 00 70 . .@.a. .o.u.t.p
00d0 00 75 00 74 00 0d 00 0a 00 00 00 26 04 04 01 00 .u.t.......&....
00e0 00 00 ..

declare @a char(1)
set @a = 'A'
exec foo @a output
------------------
0000 00 08 7c c2 42 c2 00 03 47 8b 23 05 08 00 45 00 ..|.B...G.#...E.
0010 00 d4 82 e9 40 00 80 06 21 8e 0a 00 2c 4c 0a 00 ....@...!...,L..
0020 15 61 07 e3 05 99 ea 2b af 8d bf e3 89 41 50 18 .a.....+.....AP.
0030 f5 b0 41 85 00 00 03 01 00 ac 00 00 01 00 ff ff ..A.............
0040 0b 00 00 00 00 01 26 04 04 ff ff ff ff 00 00 63 ......&........c
0050 00 00 00 00 09 04 00 01 32 ff ff ff ff 00 00 63 ........2......c
0060 6c 00 00 00 09 04 00 01 32 6c 00 00 00 64 00 65 l.......2l...d.e
0070 00 63 00 6c 00 61 00 72 00 65 00 20 00 40 00 61 .c.l.a.r.e. .@.a
0080 00 20 00 63 00 68 00 61 00 72 00 28 00 31 00 29 . .c.h.a.r.(.1.)
0090 00 0d 00 0a 00 73 00 65 00 74 00 20 00 40 00 61 .....s.e.t. .@.a
00a0 00 20 00 3d 00 20 00 27 00 41 00 27 00 0d 00 0a . .=. .'.A.'....
00b0 00 65 00 78 00 65 00 63 00 20 00 66 00 6f 00 6f .e.x.e.c. .f.o.o
00c0 00 20 00 40 00 61 00 20 00 6f 00 75 00 74 00 70 . .@.a. .o.u.t.p
00d0 00 75 00 74 00 0d 00 0a 00 00 00 26 04 04 01 00 .u.t.......&....
00e0 00 00 ..

declare @a char(1)
set @a = 'A'
exec foo @a
------------------
0000 00 08 7c c2 42 c2 00 03 47 8b 23 05 08 00 45 00 ..|.B...G.#...E.
0010 00 c6 84 bc 40 00 80 06 1f c9 0a 00 2c 4c 0a 00 ....@.......,L..
0020 15 61 07 e3 05 99 ea 2b b1 2e bf e3 8a 0c 50 18 .a.....+......P.
0030 fa a9 4b 1b 00 00 03 01 00 9e 00 00 01 00 ff ff ..K.............
0040 0b 00 00 00 00 01 26 04 04 ff ff ff ff 00 00 63 ......&........c
0050 00 00 00 00 09 04 00 01 32 ff ff ff ff 00 00 63 ........2......c
0060 5e 00 00 00 09 04 00 01 32 5e 00 00 00 64 00 65 ^.......2^...d.e
0070 00 63 00 6c 00 61 00 72 00 65 00 20 00 40 00 61 .c.l.a.r.e. .@.a
0080 00 20 00 63 00 68 00 61 00 72 00 28 00 31 00 29 . .c.h.a.r.(.1.)
0090 00 0d 00 0a 00 73 00 65 00 74 00 20 00 40 00 61 .....s.e.t. .@.a
00a0 00 20 00 3d 00 20 00 27 00 41 00 27 00 0d 00 0a . .=. .'.A.'....
00b0 00 65 00 78 00 65 00 63 00 20 00 66 00 6f 00 6f .e.x.e.c. .f.o.o
00c0 00 20 00 40 00 61 00 0d 00 0a 00 00 00 26 04 04 . .@.a.......&..
00d0 01 00 00 00 ....

/*
create procedure foo2 @bar varchar(16) output
as
select @bar = 'testy'
return 0
*/

declare @a char(1)
set @a = 'x'
exec foo2 @a output
-------------------
0000 00 08 7c c2 42 c2 00 03 47 8b 23 05 08 00 45 00 ..|.B...G.#...E.
0010 00 d6 82 12 40 00 80 06 22 63 0a 00 2c 4c 0a 00 ....@..."c..,L..
0020 15 61 07 e3 05 99 ea 2b ad ea bf e3 88 76 50 18 .a.....+.....vP.
0030 f6 7b 40 b9 00 00 03 01 00 ae 00 00 01 00 ff ff .{@.............
0040 0b 00 00 00 00 01 26 04 04 ff ff ff ff 00 00 63 ......&........c
0050 00 00 00 00 09 04 00 01 32 ff ff ff ff 00 00 63 ........2......c
0060 6e 00 00 00 09 04 00 01 32 6e 00 00 00 64 00 65 n.......2n...d.e
0070 00 63 00 6c 00 61 00 72 00 65 00 20 00 40 00 61 .c.l.a.r.e. .@.a
0080 00 20 00 63 00 68 00 61 00 72 00 28 00 31 00 29 . .c.h.a.r.(.1.)
0090 00 0d 00 0a 00 73 00 65 00 74 00 20 00 40 00 61 .....s.e.t. .@.a
00a0 00 20 00 3d 00 20 00 27 00 78 00 27 00 0d 00 0a . .=. .'.x.'....
00b0 00 65 00 78 00 65 00 63 00 20 00 66 00 6f 00 6f .e.x.e.c. .f.o.o
00c0 00 32 00 20 00 40 00 61 00 20 00 6f 00 75 00 74 .2. .@.a. .o.u.t
00d0 00 70 00 75 00 74 00 0d 00 0a 00 00 00 26 04 04 .p.u.t.......&..
00e0 01 00 00 00 ....

declare @a varchar(16)
set @a = '1234567890'
exec foo2 @a
---------------------
0000 00 08 7c c2 42 c2 00 03 47 8b 23 05 08 00 45 00 ..|.B...G.#...E.
0010 00 e2 85 cb 40 00 80 06 1e 9e 0a 00 2c 4c 0a 00 ....@.......,L..
0020 15 61 07 e3 05 99 ea 2b b2 b3 bf e3 8a d7 50 18 .a.....+......P.
0030 f9 de 29 c5 00 00 03 01 00 ba 00 00 01 00 ff ff ..).............
0040 0b 00 00 00 00 01 26 04 04 ff ff ff ff 00 00 63 ......&........c
0050 00 00 00 00 09 04 00 01 32 ff ff ff ff 00 00 63 ........2......c
0060 7a 00 00 00 09 04 00 01 32 7a 00 00 00 64 00 65 z.......2z...d.e
0070 00 63 00 6c 00 61 00 72 00 65 00 20 00 40 00 61 .c.l.a.r.e. .@.a
0080 00 20 00 76 00 61 00 72 00 63 00 68 00 61 00 72 . .v.a.r.c.h.a.r
0090 00 28 00 31 00 36 00 29 00 0d 00 0a 00 73 00 65 .(.1.6.).....s.e
00a0 00 74 00 20 00 40 00 61 00 20 00 3d 00 20 00 27 .t. .@.a. .=. .'
00b0 00 31 00 32 00 33 00 34 00 35 00 36 00 37 00 38 .1.2.3.4.5.6.7.8
00c0 00 39 00 30 00 27 00 0d 00 0a 00 65 00 78 00 65 .9.0.'.....e.x.e
00d0 00 63 00 20 00 66 00 6f 00 6f 00 32 00 20 00 40 .c. .f.o.o.2. .@
00e0 00 61 00 0d 00 0a 00 00 00 26 04 04 01 00 00 00 .a.......&......

/*
create procedure foo3
@bar varchar(16) output,
@iparam integer
as
select @bar = 'testy'
return 0
*/
declare @a varchar(16)
declare @i integer
set @a = '1234567890'
exec foo3 @a,@i
----------------------
0000 00 08 7c c2 42 c2 00 03 47 8b 23 05 08 00 45 00 ..|.B...G.#...E.
0010 01 10 90 39 40 00 80 06 14 02 0a 00 2c 4c 0a 00 ...9@.......,L..
0020 15 61 07 e3 05 99 ea 2b ba 45 bf e3 a3 15 50 18 .a.....+.E....P.
0030 f5 5c d8 58 00 00 03 01 00 e8 00 00 01 00 ff ff .\.X............
0040 0b 00 00 00 00 01 26 04 04 ff ff ff ff 00 00 63 ......&........c
0050 00 00 00 00 09 04 00 01 32 ff ff ff ff 00 00 63 ........2......c
0060 a8 00 00 00 09 04 00 01 32 a8 00 00 00 64 00 65 ........2....d.e
0070 00 63 00 6c 00 61 00 72 00 65 00 20 00 40 00 61 .c.l.a.r.e. .@.a
0080 00 20 00 76 00 61 00 72 00 63 00 68 00 61 00 72 . .v.a.r.c.h.a.r
0090 00 28 00 31 00 36 00 29 00 0d 00 0a 00 64 00 65 .(.1.6.).....d.e
00a0 00 63 00 6c 00 61 00 72 00 65 00 20 00 40 00 69 .c.l.a.r.e. .@.i
00b0 00 20 00 69 00 6e 00 74 00 65 00 67 00 65 00 72 . .i.n.t.e.g.e.r
00c0 00 0d 00 0a 00 73 00 65 00 74 00 20 00 40 00 61 .....s.e.t. .@.a
00d0 00 20 00 3d 00 20 00 27 00 31 00 32 00 33 00 34 . .=. .'.1.2.3.4
00e0 00 35 00 36 00 37 00 38 00 39 00 30 00 27 00 0d .5.6.7.8.9.0.'..
00f0 00 0a 00 65 00 78 00 65 00 63 00 20 00 66 00 6f ...e.x.e.c. .f.o
0100 00 6f 00 33 00 20 00 40 00 61 00 2c 00 40 00 69 .o.3. .@.a.,.@.i
0110 00 0d 00 0a 00 00 00 26 04 04 01 00 00 00 .......&......

/*
create procedure foo4
@bar varchar(16) output,
@iparam integer,
@tint tinyint,
@dt datetime
as
select @bar = 'testy'
return 0
*/

declare @a varchar(16)
declare @i integer
declare @t tinyint
declare @dt datetime
set @a = '1234567890'
set @i = 27000
set @t = 100
exec foo4 @a,@i,@t,@dt
----------------------
0000 00 08 7c c2 42 c2 00 03 47 8b 23 05 08 00 45 00 ..|.B...G.#...E.
0010 01 ae 91 ee 40 00 80 06 11 af 0a 00 2c 4c 0a 00 ....@.......,L..
0020 15 61 07 e3 05 99 ea 2b c0 80 bf e3 b9 69 50 18 .a.....+.....iP.
0030 f7 46 02 83 00 00 03 01 01 86 00 00 01 00 ff ff .F..............
0040 0b 00 00 00 00 01 26 04 04 ff ff ff ff 00 00 63 ......&........c
0050 00 00 00 00 09 04 00 01 32 ff ff ff ff 00 00 63 ........2......c
0060 46 01 00 00 09 04 00 01 32 46 01 00 00 64 00 65 F.......2F...d.e
0070 00 63 00 6c 00 61 00 72 00 65 00 20 00 40 00 61 .c.l.a.r.e. .@.a
0080 00 20 00 76 00 61 00 72 00 63 00 68 00 61 00 72 . .v.a.r.c.h.a.r
0090 00 28 00 31 00 36 00 29 00 0d 00 0a 00 64 00 65 .(.1.6.).....d.e
00a0 00 63 00 6c 00 61 00 72 00 65 00 20 00 40 00 69 .c.l.a.r.e. .@.i
00b0 00 20 00 69 00 6e 00 74 00 65 00 67 00 65 00 72 . .i.n.t.e.g.e.r
00c0 00 0d 00 0a 00 64 00 65 00 63 00 6c 00 61 00 72 .....d.e.c.l.a.r
00d0 00 65 00 20 00 40 00 74 00 20 00 74 00 69 00 6e .e. .@.t. .t.i.n
00e0 00 79 00 69 00 6e 00 74 00 0d 00 0a 00 64 00 65 .y.i.n.t.....d.e
00f0 00 63 00 6c 00 61 00 72 00 65 00 20 00 40 00 64 .c.l.a.r.e. .@.d
0100 00 74 00 20 00 64 00 61 00 74 00 65 00 74 00 69 .t. .d.a.t.e.t.i
0110 00 6d 00 65 00 0d 00 0a 00 73 00 65 00 74 00 20 .m.e.....s.e.t.
0120 00 40 00 61 00 20 00 3d 00 20 00 27 00 31 00 32 .@.a. .=. .'.1.2
0130 00 33 00 34 00 35 00 36 00 37 00 38 00 39 00 30 .3.4.5.6.7.8.9.0
0140 00 27 00 0d 00 0a 00 73 00 65 00 74 00 20 00 40 .'.....s.e.t. .@
0150 00 69 00 20 00 3d 00 20 00 32 00 37 00 30 00 30 .i. .=. .2.7.0.0
0160 00 30 00 0d 00 0a 00 73 00 65 00 74 00 20 00 40 .0.....s.e.t. .@
0170 00 74 00 20 00 3d 00 20 00 31 00 30 00 30 00 0d .t. .=. .1.0.0..
0180 00 0a 00 65 00 78 00 65 00 63 00 20 00 66 00 6f ...e.x.e.c. .f.o
0190 00 6f 00 34 00 20 00 40 00 61 00 2c 00 40 00 69 .o.4. .@.a.,.@.i
01a0 00 2c 00 40 00 74 00 2c 00 40 00 64 00 74 00 0d .,.@.t.,.@.d.t..
01b0 00 0a 00 00 00 26 04 04 01 00 00 00 .....&......



On Thu, 17 Jul 2003, Lowden, James K wrote:

> > From: lists-tds AT mymailfilter.net [mailto:lists-tds AT mymailfilter.net]
> > Sent: July 17, 2003 5:32 PM
> >
> > > create procedure foo @bar char(1) = 'B' output
> > > as select @bar='A'
> > > return 0
> > >
> > > Then try these three calls:
> > >
> > > execute foo
> > > execute foo @a
> > > execute foo @a output
>
> > I haven't examined these yet
>
> Hmmm. The length byte grows, of course (5a, 88, 96), but the size of the
> "prefix" is constant. Pretty much, so is the content. After the second FF
> FF FF FF block, there's a slight variation:
>
> 1. 00 00 63 1a 00 00 00 09 04 00 01 32 1a 00 00
> 2. 00 00 63 48 00 00 00 09 04 00 01 32 48 00 00
> 3. 00 00 63 56 00 00 00 09 04 00 01 32 56 00 00
> ^^ ^^
>
> What I can tell you is that those bytes don't leap out as having intrinsic
> TDS significance. They don't represent a datatype that I know of. They're
> not in the server's systypes table, either.
>
> I don't think they're bitmapped values; they're too different:
>
> $ perl -e'printf " %b\n %b\n %b\n", 0x1a, 0x48, 0x56'
> 11010
> 1001000
> 1010110
>
> Maybe try initializing @a to a few different values, and try defining @a as
> char(2) and/or varchar(1)? That might offer a few more data points.
>
> --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.
>
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>





Archive powered by MHonArc 2.6.24.

Top of Page