Product: TIBCO Spotfire®
Calling a Stored Procedure in Oracle Database using IronPython Script in TIBCO Spotfire throws the error System.Data.OracleClient.OracleException: ORA-00900: invalid SQL statement
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.
The command to be used in IronPython Scripting is:
Begin <ProcedureName>; End;
The following IronPython script could be used:
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)
Comments
0 comments
Article is closed for comments.