freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Specifying a 0 for the "StrLen_or_IndPtr
- From: "shiv kumar" <shivblore2000 AT gmail.com>
- To: freetds AT lists.ibiblio.org
- Subject: Re: [freetds] Specifying a 0 for the "StrLen_or_IndPtr
- Date: Wed, 22 Nov 2006 11:56:16 +0530
Thanks a lot freddy,
The return value of RPC_Read is int.
The first paramater type is also int.
The second paramter is of type timestamp.
Shiva
Hi All,
Please find the simplified below code which is giving
problem: In the code
if I replace the "ValSz_ind3 = 8;" to "ValSz_ind3 = 0;" then the
SQLExecute is returning the SQL_ERROR. Unfortunately after
this if I call
"SQLGetDiagRec" it is returning a null empty string. The same code is
working well with the solaris and unix. I am using the uniXODBC
2.2.11version and hopefully I am not building it as 64-bit driver. I
have tried
with both FreeTDS0.63 and FreeTDS 0.64 version.
PLEASE HELP.
int spcall (char*)
{
int retcode;
long ValSz_ind1, ValSz_ind2, ValSz_ind3 = 0 ;
int p1 = 0, p2 = 1;
char p3[32];
retcode = SQLFreeStmt(hstmt1, SQL_CLOSE);
retcode = HandleError( hstmt1, 2, retcode);
retcode = SQLFreeStmt(hstmt1, SQL_UNBIND);
retcode = HandleError( hstmt1, 2, retcode);
retcode = SQLPrepare (hstmt1, (SQLCHAR *) "{ ? =
CALL RPC_Read (
?, ? ) }" , SQL_NTS);
if(!HandleError(hstmt1, 2, retcode))
return 65302;
retcode = SQLBindParameter(hstmt1, 1, SQL_PARAM_OUTPUT /*
SQL_RETURN_VALUE */, SQL_C_LONG, SQL_INTEGER,
0, 0,
(SQLPOINTER)&p1, 0,
&ValSz_ind1);
if(!HandleError(hstmt1, 2, retcode))
return 65302;
retcode = SQLBindParameter(hstmt1, 2, SQL_PARAM_INPUT /*
SQL_RETURN_VALUE */, SQL_C_LONG, SQL_INTEGER,
0, 0,
(SQLPOINTER)&p2, 0,
&ValSz_ind2);
if(!HandleError(hstmt1, 2, retcode))
return 65302;
ValSz_ind3 = 8; // If I specify this a
retcode = SQLBindParameter(hstmt1, 3, SQL_PARAM_INPUT,
SQL_C_BINARY, SQL_VARBINARY,
8, 0 , p3, 8, &ValSz_ind3);
if(!HandleError(hstmt1, 2, retcode))
return 65302;
retcode = SQLExecute(hstmt1);
if(!HandleError(hstmt1, 2, retcode))
return 65302;
retcode = SQLFetch(hstmt1);
if(!HandleError(hstmt1, 2, retcode))
return 65302;
return 0;
}
What are RPC_Read parameter types ??
freddy77
-
Re: [freetds] Specifying a 0 for the "StrLen_or_IndPtr,
shiv kumar, 11/22/2006
- <Possible follow-up(s)>
- Re: [freetds] Specifying a 0 for the "StrLen_or_IndPtr, ZIGLIO, Frediano, VF-IT, 11/23/2006
- Re: [freetds] Specifying a 0 for the "StrLen_or_IndPtr, shiv kumar, 11/24/2006
Archive powered by MHonArc 2.6.24.