Products | Versions |
---|---|
Spotfire Analyst | All |
Using an IronPython script in TIBCO Spotfire to call a stored procedure in an Oracle database using the following query Exec <ProcedureName>
results in the following error message:
Exception: Unable to execute SQL statement: 'Exec Sample0;' Spotfire.Dxp.Data.Exceptions.ImportException: Unable to execute SQL statement: 'Exec Sample0;' ---> System.Data.OracleClient.OracleException: ORA-00900: invalid SQL statement
Being a SQL command it may work as expected in Oracle SQL Developer but cannot be used in IDE's.
Note: Calling a stored procedure using the same query works in the case of Microsoft SQL Server.
Begin <ProcedureName>; End;
from Spotfire.Dxp.Data.Import import * sqlStr ="Begin Sample0; End;" dbsettings = DatabaseDataSourceSettings( "System.Data.OracleClient","Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<Server_Name>)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=<Service_Name>)));User Id=<User>;Password=<Password>",sqlStr) ds = DatabaseDataSource(dbsettings)