Skip to Content.
Sympa Menu

freetds - RE: [freetds] RE: output parameters and "unknown marker"

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Thompson, Bill D (London)" <bill_d_thompson AT ml.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] RE: output parameters and "unknown marker"
  • Date: Fri, 7 Jan 2005 13:24:09 -0000

well spotted Freddy,

shall I code the patch (including using tds_get_null_type) ?

Bill

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of ZIGLIO,
Frediano, VF-IT
Sent: 07 January 2005 13:20
To: FreeTDS Development Group
Subject: RE: [freetds] RE: output parameters and "unknown marker"


>
> Josh, Freddy,
>
> The following change to src/dblib/rpc.c
> seems to fix the problem with NULL output parameters...
>
> in function param_info-alloc():
>
> tdsdump_log(TDS_DBG_INFO1, "parm_info_alloc(): parameter null-ness =
> %d\n", param_is_null);
>
> - if (param_is_null) {
> + if (param_is_null || (p->status & DBRPCRETURN)) {
>
> Would this be OK do you think freddy ?
> Josh, could you test it out ?
>
> Bill
>

If param is input/output and not null you pass also a null input
parameter, perhaps patch should be

- if (param_is_null) {
- temp_datalen = 0;
- temp_value = NULL;
+ if (param_is_null || (p->status & DBRPCRETURN)) {
+ if (param_is_null) {
+ temp_datalen = 0;
+ temp_value = NULL;
+ }

There should be a function that return nullable type from not-nullable.

freddy77
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
--------------------------------------------------------

If you are not an intended recipient of this e-mail, please notify the
sender, delete it and do not read, act upon, print, disclose, copy, retain or
redistribute it. Click here for important additional terms relating to this
e-mail. http://www.ml.com/email_terms/
--------------------------------------------------------





Archive powered by MHonArc 2.6.24.

Top of Page