|
Peter,
Thanks
for your reply. I am actively looking at tcl as an alternative but still
having trouble with the Stored Procedure. I have a script that works for
excuting SQL commands (at least some commands) but fails when calling a strored
procedure with the (unhelpful) error
MyTest Error: orasql: SQL execution
failed.
The
same call from SQL/Plus logged on with same user/password is
ok:
SQL>
SQL> SQL> exec chi_two.mytest; PL/SQL procedure
successfully completed.
SQL>
I
would be pleased to receive comments on what I must be
missing
Thanks
Richard Wilkinson
My
TCL script is:
# for error handling set program "MyTest Error" #
========================================================================= # # Test_FME_END.tcl # # This script records the execution of a translation
using # the Oratcl package. This example includes the creation of
the # XLATION_RESULTS table for storing the translation
results. # One row for each translation run is inserted into the
table. package require Oratcl #
========================================================================= # Login to the Oracle service set username chi_two set password gumb0 set service lgis set loginHandle [oralogon
$username/[EMAIL PROTECTED] #
========================================================================= # Determine if the xlation_results table we wish to record results
to exists set tableExists no set statementHandle [oraopen
$loginHandle] orasql $statementHandle "select * from user_tables where
table_name = 'TEMP4XL'" while {[orafetch $statementHandle -datavariable row] == 0}
{ set tableExists yes }
set sql "EXEC CHI_TWO.MYTEST" if [catch {orasql $statementHandle $sql} ora_error]
{ puts stderr
"$program: $ora_error" } #=====================THIS
WORKS=========================================== orasql $statementHandle "TRUNCATE TABLE TEMP4XL"
-commit orasql $statementHandle "INSERT INTO
TEMP4XL Select
id_key, Locality from parkland_agg_new" -commit #
========================================================================= # Shut down the statement handle oraclose $statementHandle #
========================================================================= # Logout of our oracle service oralogoff $loginHandle The
called procedure, chi_two.mytest, has the single line of code for
testing:
insert into test (id) values (999);
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of peter laulund Sent: 13 November 2006 21:20 To: [email protected] Subject: RE: [fme] Calling an Oracle Stored procedure __._,_.___ For insights into what's up at Safe Software and what's on the development horizon, visit Safe's blog at spatial-etl.blogspot.com. Safe Software has also made slides available that outline enhancements planned for FME 2007. The slides are from the "Road Ahead" presentation given on Day 2 of the FME Worldwide Users Conference. To view these slides, visit www.safe.com/2006uc.
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ |
Title: Message
- [fme] Calling an Oracle Stored procedure Richard Wilkinson
- RE: [fme] Calling an Oracle Stored procedure peter laulund
- RE: [fme] Calling an Oracle Stored procedure Richard Wilkinson
