SqlPLSQLCommand sets result set mode off

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

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!

Marco

SqlPLSQLCommand sets result set mode off

Post by Marco » 04 Aug 2006, 14:35

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

Hi,

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

May be you can try SqlOraPLSQLPrepare, SqlOraPLSQLExecute



Daniela a =E9crit :

Daniela

SqlPLSQLCommand sets result set mode off

Post by Daniela » 04 Aug 2006, 16:09

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

Marco a scris:



Hi Marco

Thank you for your help.

The strCommand is like:

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
Set bOK =3D SqlOraPLSQLPrepare ( hSqlPL, strAnonymousPLSQLBlock)
Set bOK =3D SqlOraPLSQLExecute ( hSqlPL)

where
strAnonymousPLSQLBlock =3D ' BEGIN
=09=09=09=09sPackPLSQL.sPLSQLFunction ( :sQaonr, :nAonr, :sLonr, :sTestgrou=
pId,
:AtestmoduleId1, :sAtestmoduleId2, :sAtestmoduleId3, :sresultunitid,
:sMaxRunnr, :sMaxSeqnr, :sOutNumber );
=09=09=09=09END; '

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 ?
=09=09=09
Thank you

Daniela

Return to “forum.sqlwindows”

Who is online

Users browsing this forum: [Ccbot] and 0 guests