MySQL Forums
Forum List  »  Connector/ODBC

ODBC-API and INOUT Parameter?!
Posted by: j.hunners
Date: January 18, 2005 03:21AM

Hi

I use the ODBC-API-functions, MySQL 3.51 and the ODBC-Driver 3.51.06.00

My Problem:
I can’t get an INOUT Parameter from a stored procedure!

Here is my code section:
…..
string strSQL = " call testIntInOut(?)"; //procedure with INOUT Param, should return 987654

sqlReturn = SQLPrepare(m_StmtHndl,(UCHAR*)strSQL.c_str(), SQL_NTS);
…
int myInt = 12345;
SQLUINTEGER size = sizeof(int);
SQLINTEGER len = size;
sqlReturn = SQLBindParameter(m_StmtHndl,1,SQL_PARAM_INPUT_OUTPUT,SQL_C_SLONG,SQL_INTEGER,size,0,
&myInt,size,&len);
…..
sqlReturn = SQLExecute(m_StmtHndl);
….
while (SQLMoreResults(m_StmtHndl) != SQL_NO_DATA)
sqlReturn = SQLMoreResults(m_StmtHndl);
….

The return value in myInt is always 12345 !
Support the MySQL driver INOUT Parameter or what is wrong with my code?
(in Microsoft SQL Server – the code functions )


I have a second question.
How can disable the auto-reconnect function in the MySQL Server?


Thanks!

Options: Reply• Quote


Subject
Written By
Posted
ODBC-API and INOUT Parameter?!
January 18, 2005 03:21AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.