[freetds] RE: output parameters and "unknown marker"
alin_sinpalean at users.sourceforge.net
Fri Jan 7 07:26:23 EST 2005
"ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio at vodafone.com> wrote:
> As you can see I use always nullable type and I receive correctly data.
> It seems that mssql try to use the same type used in input and fail on
> NULL if client pass not-nullable types. It returns also garbage !!! I
> don't think it's a different code but a bug (you can consider a client
> or a server problem... client should send correct type while server
> should validate more accurately data and not send garbage). So... all we
> have to change it's tds_set_param_type in src/tds/data.c (and possibly
> add some tests too).
You are right. jTDS always uses nullable types when sending parameters and it never had this problem. It seems like SQL Server "forgets" to change the parameter type and tries to return a null value using a non-nullable type (it sends the 0 length, it should only change the type to the equivalent nullable type). It also messes up the token length, but I guess no one is looking at that anyway.
"Thompson, Bill D (London)" <bill_d_thompson at ml.com> wrote:
> I've recently noticed how well jTDS is doing - congratulations on API
Thank you, Bill. We still haven't managed to join our TDS documentation efforts, but who knows? ;o)
The jTDS Project.
More information about the FreeTDS