IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Trouble with calling stored procedure
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Gold member
Posted
Hello. I'm having trouble calling an Oracle stored procedure. I'm on WF 4.x, and I have a stored procedure package MY_PKG with a function myFun1. This procedure takes in a project id and uses a IN OUT cursor to select some columns from a table. (this procedure works when called from other programming languages)
I'm trying:
SQL EX MY_PKG.myFun1 &ProjectID;
-* if I replace the line above with something like:
-* SQL select * from T1 where proj='&ProjectID';
-* then everything works just fine
-* (but I really need to be able to call a stored proc and not do direct SQL in WF code)
TABLE
ON TABLE HOLD AS myReport
END
-RUN
TABLE FILE myReport
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, $
ENDSTYLE
PRINT *
ON TABLE PCHOLD FORMAT EXL2K
END

And this is failing before it even asks me to input the project id:
there was a error running 'app/test1.fex' this error has to to with the file 'my_pkg.myfun1 &projectid;' it may be missing the internal errorcode was '1023'
Can anyone suggest some ideas for how to do this? I noticed some posts on SQL passthru:
http://documentation.informationbuilders.com/masterinde...tadapt_admin_523.pdf
but this does not allow to return anything from a stored procedure, which is not useful. Thanks.
 
Posts: 51 | Registered: September 29, 2004Reply With QuoteEdit or Delete MessageReport This Post
Gold member
Posted Hide Post
We are on 5.2 but this is what we do--

SQL SQLORA EX rpts_own.plcy_cvrg_pckg.plcy_cvrg_prc (&NCLM);

the package name is plcy_cvrg_pckg
the procdure name is plcy_cvrg_prc which accepts parm &NCLM
 
Posts: 63 | Location: OH | Registered: November 09, 2004Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
Your missing a couple of things:

The SQL interface type (SQLMSS for me), and the SQLOUT reference when calling a stored procedure answer set. Here is an example of a MS SQL Call:

SQL SQLMSS
EX dbase.dbo.spTest &PARM;
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS temp-name [FORMAT ?]
END
 
Posts: 531 | Location: Toronto, Ontario, Canada. | Registered: May 26, 2004Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Trouble with calling stored procedure

Copyright © 1996-2008 Information Builders, leaders in enterprise business intelligence.