freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Gustavo A. Gonzalez" <ggonzalez AT telviso.com.ar>
- To: <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Using DBRPCPARAM
- Date: Tue, 20 Jun 2006 11:53:56 -0300
>It could be a problem with nulls. Which FreeTDS version are you using?
>Could you try to repeat test with first parameter only? Or just post
>first two dbrpcparam calls.
Thanks for replay me about DBRPCPARAM. 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;
if ( dbrpcparam(dbcon, "@ani", (BYTE)0, SYBVARCHAR,
sizeof(rsaldo->sal_nro_ani), sizeof(rsaldo->sal_nro_ani), (BYTE
*)&rsaldo->sal_nro_ani) == FAIL)return FAIL;
//Stored Procedure RETURN VALUES
if (dbrpcparam(dbcon, "@estado", (BYTE)DBRPCRETURN, SYBINT4, -1, -1, (BYTE
*)&rsaldo->sal_sp_estado) == FAIL)return FAIL;
if (dbrpcparam(dbcon, "@saldo", (BYTE)DBRPCRETURN, SYBMONEY, -1, -1, (BYTE
*)saldo) == FAIL) return FAIL;
if (dbrpcparam(dbcon, "@cliente", (BYTE)DBRPCRETURN, SYBINT4, -1,-1, (BYTE
*)&rsaldo->sal_tipo_cliente) == FAIL)return FAIL;}
It works fine on a fedora core 3 distro, kernel 2.6.9 with freetds 0.62.4 but
wont work on a DEBIAN Distro, kernel 2.6.12.4 with freetds 0.63. Thanks !
G.
-
[freetds] Using DBRPCPARAM,
Gustavo A. Gonzalez, 06/14/2006
- <Possible follow-up(s)>
- Re: [freetds] Using DBRPCPARAM, ZIGLIO, Frediano, VF-IT, 06/19/2006
- Re: [freetds] Using DBRPCPARAM, Gustavo A. Gonzalez, 06/20/2006
- Re: [freetds] Using DBRPCPARAM, Lowden, James K, 06/21/2006
Archive powered by MHonArc 2.6.24.