[unixODBC-support] stored procedure with output parameter

Nagesh Sharvari-A21337 sharvari.nagesh at motorola.com
Mon May 29 07:22:51 BST 2006


Nick,
	any update on this? Could you speak to MySQL people?
 

-----Original Message-----
From: unixodbc-support-bounces at easysoft.com
[mailto:unixodbc-support-bounces at easysoft.com] On Behalf Of Nick Gorham
Sent: Thursday, May 25, 2006 4:45 PM
To: Support for the unixODBC project
Subject: Re: [unixODBC-support] stored procedure with output parameter

Nagesh Sharvari-A21337 wrote:

>Hey 
>    I am facing problem executing stored procedures which has an out 
>parameters. Please tell me what's wrong in my code This is how I am 
>using call statement to execute a procedure,
>simpleproc:
> 
> strcpy(stmt, "call simpleproc(?)") ;
> rc = SQLPrepare(hstmt,stmt,SQL_NTS);   
> 
>and binding an integer parameter, id to the statment :
> 
>rc= SQLBindParameter(hstmt, 1, SQL_PARAM_OUTPUT, SQL_C_LONG, 
>SQL_INTEGER, 0, 0, &id, 0, NULL);
>    
>rc=SQLExecute(hstmt);
>if ((rc != SQL_SUCCESS) && (rc != SQL_SUCCESS_WITH_INFO)) {
>   printf("Error in call to stored procedure %d\n",rc);
>   SQLGetDiagRec(SQL_HANDLE_STMT, hstmt,1, stat,&err,msg,100,&mlen);
>   printf("%s (%d)\n State : %s \n",msg,err, stat); }
> 
>  
>
The code looks fine, I think it will be a issue with the MySQL driver, I
would ask the MySQL folk.

--
Nick Gorham
Easysoft Limited
http://www.easysoft.com, http://www.unixODBC.org

_______________________________________________
unixODBC-support mailing list
unixODBC-support at easysoft.com
http://mail.easysoft.com/mailman/listinfo/unixodbc-support




More information about the unixODBC-support mailing list