[freetds] output parameters and "unknown marker"

Frediano Ziglio freddyz77 at tin.it
Thu Jan 6 13:18:34 EST 2005


Il giorno gio, 06-01-2005 alle 12:00 -0500, Lowden, James K ha scritto:
> > From: Thompson, Bill D (London)
> > Sent: Thursday, January 06, 2005 11:33 AM
> > 
> > certainly our code seems not to handle the data that's coming our way...
> > I think the issue might be with using TDS 8.0 rather than 7.0 - I didn't know there was a difference in the AC(param) token between these two versions but there does appear to be...
> 
> Bill, 
> 
> Could it be that datatype 3D (datetime) should be treated as variable length?  
> 
> Here's my analysis of the packet, based on http://www.freetds.org/tds.html#responses:
> 
> Return Status:
> 79  00 00 00 00 
>     (zero)
> 
> 
> Output Parameter 1:
> ac  1100  05  4000 6c00 6100 7300 7400  01 3d 00 00 00  3d  00 
>               (5-char name)             (5 bytes unk.)      ^^ length?
> 
> 
> Output Parameter 2:
> ac  1100  05  4000 7000 7200 6500 7600  01 3d 00 00 00  3d  00 
>               (5-char name)             (5 bytes unk.)      ^^ length?
> 
> Process Done:
> fe  0000  e000  01000000
> (no more results, row count not valid)
> 
> I imagine the "unknown" bytes are collation data.
> 
> 

No unknown should be 

01           flags
3d 00 00 00  usertype
3d           type

Usually under mssql bit 0 on status means nullable. It seems that in
some condition mssql return for nullable datetime using not nullable
type and nullable flag. As you can see parameter in input are passed
using not nullable type, perhaps this cause the problem.

Declaration of pdtGetDealRevalDates would help.

freddy77




More information about the FreeTDS mailing list