SqlPLSQLCommand sets result set mode off

forum.centura.team.developer (1998-2005) & forum.sqlwindows (2000-2005)

SqlPLSQLCommand sets result set mode off

Post by Daniela » 03 Aug 2006, 10:41

 Posted by:  Daniela <daniela...@waters.com> 

Hi at all,

My name is Daniela Cristea from Romania.

I have a situation like this

If SqlPrepareAndExecute(hSqlTempCctCalc, sSqlCmdCalc )
While SqlFetchNext(hSqlTempCctCalc, nFetchCalc )
Call SqlPLSQLCommand(hSqlPL, strCommand)

My problem is that even if we have several records given by the select
sSqlCmdCalc , after the first call of SqlPLSQLCommand the
SqlFetchNext(hSqlTempCctCalc, nFetchCalc ) returns FALSE, so the PLSQL
procedure is executed only once.
We also tried to call SqlSetResultSet(hSqlTempCctCalc, TRUE) after
SqlPLSQLCommand , but the functionality was the same.

Do you have any idee how I can fix the bug?

Thank you in advance!


Re: SqlPLSQLCommand sets result set mode off

Post by Marco » 04 Aug 2006, 14:35

 Posted by:  Marco <m-fu...@artefrance.fr> 


What kind of command is behind :
SqlPLSQLCommand(hSqlPL, strCommand) ?
strCommand : what kind of sql query is this

May be you can try SqlOraPLSQLPrepare, SqlOraPLSQLExecute


Re: SqlPLSQLCommand sets result set mode off

Post by Daniela » 04 Aug 2006, 16:09

 Posted by:  Daniela <daniela...@waters.com> 

Hi Marco

Thank you for your help.

The strCommand is like:

Code: Select all

Set strCommand =3D sPackPLSQL || '.' || sPLSQLFunction
Set strCommand =3D strCommand || '( '' || sQaonr || '',' ||
SalNumberToStrX(nAonr,0) || ','' || sLonr || '','' || sTestgroupId
|| '','' || sAtestmoduleId1 || '','' || sAtestmoduleId2 || '',''
|| sAtestmoduleId3|| '','' || sresultunitid || '','' || sMaxRunnr
|| '', sOutNumber ) '
where sOutNumber is output variable.

I have tried with

Code: Select all

Set bOK =3D SqlOraPLSQLPrepare ( hSqlPL, strAnonymousPLSQLBlock)
Set bOK =3D SqlOraPLSQLExecute ( hSqlPL)
strAnonymousPLSQLBlock =3D ' BEGIN
=09=09=09=09sPackPLSQL.sPLSQLFunction ( :sQaonr, :nAonr, :sLonr, :sTestgroupId,
:AtestmoduleId1, :sAtestmoduleId2, :sAtestmoduleId3, :sresultunitid,:sMaxRunnr, :sMaxSeqnr, :sOutNumber );
END; '

but SqlOraPLSQLExecute return FALSE (it doesn't return the output variable sOutNumber )

Do you have a idea why I can't get the output variable sOutNumber ?

Thank you


Return to “forum.sqlwindows”

Who is online

Users browsing this forum: [Ccbot] and 0 guests