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

Thompson, Bill D (London) bill_d_thompson at ml.com
Fri Jan 7 08:24:09 EST 2005


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/ 
--------------------------------------------------------
 


More information about the FreeTDS mailing list