freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Gustavo A. Gonzalez" <ggonzalez AT telviso.com.ar>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] SP parameters
- Date: Mon, 26 Jun 2006 17:38:29 -0300
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;}
I call that from a procedure this way:
loadparam_ex(rsaldo, dbconn, &op, &saldo);
where 'rsaldo' is a struct str_saldo structure, 'dbconn' my connection
pointer, 'op' is an integer and 'saldo' is a DBMONEY variable.
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] 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.