dbTalk Databases Forums  

Centura 3.1 & PL/SQL

comp.databases.gupta comp.databases.gupta


Discuss Centura 3.1 & PL/SQL in the comp.databases.gupta forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Marco
 
Posts: n/a

Default Centura 3.1 & PL/SQL - 04-15-2005 , 05:42 AM






Hi !
We use for many years CTD 1.5.1 PTF6 on Oracle 8 without any problems.


We use the native oracle router (sqlora32.dll)


Recently we decided to (just try) migrate to CTD3.0, CTD3.1 or CTD4.0,
but we discovered some 'bugs?'. Let me explain it !


We use an "h_sql" cursor.


We call some SQL queries and some PL/SQL commands, in 1.5.1 everything
works fine. But from the 3.0 version, it doesn't work.


We obtain either an ORA-24333 Iteration Zero Count error
or Centura just collapses.


Source code:
------------------------------*---
Set SqlDatabase = "MYBASE"
Set SqlUser = "SCHEMA_OWNER"
Set SqlPassword = "OWNER_PASS"
If SqlConnect( h_sql )
!
Call SqlSetResultSet( h_sql, FALSE )
Call SqlSetParameter(h_sql,DBP_AUTO*COMMIT,FALSE,'')
Call SqlSetParameter(h_sql,DBP_PRES*ERVE,TRUE,'')
Call SqlSetParameterAll( h_sql, 5128, 1, '', TRUE )
......
Set s_sql = "SELECT ..... INTO ... FROM ... WHERE .... "
Call SqlPrepare( h_sql, s_sql )
Call SqlExecute( h_sql )
Call SqlFetchNext( h_sql, n_retour )
......
Call SqlPLSQLCommand( h_sql , 'fct_test(t, s)' )


Connected as the schema owner, it works !


But if we connect as an end-user which is not the owner of the table
or procedures or function PL/SQL, but is just granted, it failed with
the error
ORA-24333 Iteration zero count.
All users are connected on an end-user account and never on the schema
owner.

i also tried:
Call SqlOraPLSQLPrepare( p_h_sql, s_bloc )
Call SqlOraPLSQLExecute( p_h_sql )

But it failed too!

I dont't understand why connected as the owner, it works and connected
as an end-user it failed.


Next try, connect a second cursor only for PL/SQL command, so we have
2 cursors
h_sql used only for SQL queries (select, insert, update, delete)
h_pl_sql used only for PL/SQL calls


And now it works, connected as Owner or End-user, all is ok.
But we must change all our app, and modify the cursor for pl/sql
calls.


So is there a bug in the centura native router for Oracle ! This is my
conclusion because in 1.5.1 it worked !

Reply With Quote
  #2  
Old   
Paul Idzik
 
Posts: n/a

Default Re: Centura 3.1 & PL/SQL - 05-03-2005 , 09:03 AM






Hi Marko,

try with an ora client >= 8.1.7.

regards

Paul


"Marco" <m-furberg (AT) artefrance (DOT) fr> schrieb im Newsbeitrag
news:a06db038.0504150242.20ace0ab (AT) posting (DOT) google.com...
Quote:
Hi !
We use for many years CTD 1.5.1 PTF6 on Oracle 8 without any problems.


We use the native oracle router (sqlora32.dll)


Recently we decided to (just try) migrate to CTD3.0, CTD3.1 or CTD4.0,
but we discovered some 'bugs?'. Let me explain it !


We use an "h_sql" cursor.


We call some SQL queries and some PL/SQL commands, in 1.5.1 everything
works fine. But from the 3.0 version, it doesn't work.


We obtain either an ORA-24333 Iteration Zero Count error
or Centura just collapses.


Source code:
------------------------------*---
Set SqlDatabase = "MYBASE"
Set SqlUser = "SCHEMA_OWNER"
Set SqlPassword = "OWNER_PASS"
If SqlConnect( h_sql )
!
Call SqlSetResultSet( h_sql, FALSE )
Call SqlSetParameter(h_sql,DBP_AUTO*COMMIT,FALSE,'')
Call SqlSetParameter(h_sql,DBP_PRES*ERVE,TRUE,'')
Call SqlSetParameterAll( h_sql, 5128, 1, '', TRUE )
.....
Set s_sql = "SELECT ..... INTO ... FROM ... WHERE .... "
Call SqlPrepare( h_sql, s_sql )
Call SqlExecute( h_sql )
Call SqlFetchNext( h_sql, n_retour )
.....
Call SqlPLSQLCommand( h_sql , 'fct_test(t, s)' )


Connected as the schema owner, it works !


But if we connect as an end-user which is not the owner of the table
or procedures or function PL/SQL, but is just granted, it failed with
the error
ORA-24333 Iteration zero count.
All users are connected on an end-user account and never on the schema
owner.

i also tried:
Call SqlOraPLSQLPrepare( p_h_sql, s_bloc )
Call SqlOraPLSQLExecute( p_h_sql )

But it failed too!

I dont't understand why connected as the owner, it works and connected
as an end-user it failed.


Next try, connect a second cursor only for PL/SQL command, so we have
2 cursors
h_sql used only for SQL queries (select, insert, update, delete)
h_pl_sql used only for PL/SQL calls


And now it works, connected as Owner or End-user, all is ok.
But we must change all our app, and modify the cursor for pl/sql
calls.


So is there a bug in the centura native router for Oracle ! This is my
conclusion because in 1.5.1 it worked !



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.