freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] SP parameters
- Date: Tue, 27 Jun 2006 11:26:14 +0200
>
> Well, I'm using freetds 0.63 and I'm working with this record
> per transaction:
>
> struct str_saldo
> {
> char sal_nro_tarjeta[MAX_STR];
> char sal_nro_ani[MAX_STR];
> int sal_sp_estado;
> char sal_saldofinal[MAX_STR];
> int sal_tipo_cliente;
> char sal_sp_exec[MAX_STR];
> };
> And it's my dbrpcparam calls for
> "Telviso_ValidaSaldoTarjetaAni" procedure that require 6 parameters.
>
> if ( dbrpcparam(dbcon, "@devuelve", (BYTE)0, SYBINT4, -1,
> -1, (BYTE *)op ) == FAIL) return FAIL;
> if ( dbrpcparam(dbcon, "@tarjeta", (BYTE)0, SYBVARCHAR,
> sizeof(rsaldo->sal_nro_tarjeta),
> sizeof(rsaldo->sal_nro_tarjeta), (BYTE
> *)&rsaldo->sal_nro_tarjeta) == FAIL)return FAIL;
This is quite wrong, maxlen should be 0 while datalen should be actual
length, something like
if (dbrpcparam(dbcon, "@tarjeta", 0, SYBVARCHAR, 0,
strlen(rsaldo->sal_nro_tarjeta),
(BYTE *)&rsaldo->sal_nro_tarjeta) == FAIL)
return FAIL;
However I'm having some strange problems, current 0.63 returns
executing dbrpcinit
executing dbrpcsend
executing dbsqlok
rpc: dblib.c:1473: dbcolname: Assertion `resinfo' failed.
Aborted
freddy77
-
[freetds] SP parameters,
Gustavo A. Gonzalez, 06/15/2006
- <Possible follow-up(s)>
-
Re: [freetds] SP parameters,
Lowden, James K, 06/15/2006
- Re: [freetds] SP parameters, Ellert van Koperen, 06/15/2006
-
Re: [freetds] SP parameters,
ZIGLIO, Frediano, VF-IT, 06/16/2006
- Re: [freetds] SP parameters, Ellert van Koperen, 06/22/2006
- Re: [freetds] SP parameters, ZIGLIO, Frediano, VF-IT, 06/26/2006
- Re: [freetds] SP parameters, ZIGLIO, Frediano, VF-IT, 06/26/2006
- Re: [freetds] SP parameters, Gustavo A. Gonzalez, 06/26/2006
- Re: [freetds] SP parameters, ZIGLIO, Frediano, VF-IT, 06/27/2006
-
Re: [freetds] SP parameters,
Gustavo A. Gonzalez, 06/27/2006
- Re: [freetds] SP parameters, James K. Lowden, 06/27/2006
- Re: [freetds] SP parameters, ZIGLIO, Frediano, VF-IT, 06/28/2006
Archive powered by MHonArc 2.6.24.