Got the solution!!!
Yipee!!!
On Apr 18, 7:39 pm, vikas
<vikas.ro...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi all,
> I am getting a problem in calling Stored Procedure from C++
> application on macintosh using OpenLink.
>
> Exact scenario is that my stored procedure takes 6 parameters out of
> which 1 parameter is out parameter and other 5 are input parameters.
>
> So it uses 5 IN parameters as values for inserting a row in database
> and returns its max id as out parameter.
>
> Code Snippet is given below :--
>
> SWORD returnCode = 0;
> SDWORD bindReturnCode = 0;
> RETCODE returnVal;
> char sqlString[500];
>
> memset(sqlString,0,sizeof(sqlString));
> HSTMT hstmt = ptrDB->GetHSTMT();
> returnVal = SQLAllocStmt(ptrDB->GetHDBC(), &hstmt);
>
> if (returnVal == SQL_SUCCESS)
> {
> returnVal = SQLBindParameter(hstmt, 1, SQL_PARAM_OUTPUT,
> SQL_C_SLONG, SQL_INTEGER,
> 0,0, &returnCode,0,
&bindReturnCode);
>
> //strcpy(sqlString,"{call PI_ShBlobData (?, 0, 0, 0,
> EMPTY_BLOB(), null)}");
> returnVal = SQLExecDirectA(hstmt, (UCHAR*)sqlString,
> SQL_NTS);
>
> refPk = returnCode;
> bRetVal = true;
> ptrDB->CommitTrans();
> }
>
> SQLFreeStmt(hstmt, SQL_DROP);
>
> Thanks for help in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---