Oracle Managed Driver, no varchar Params in Query

Stimulsoft Reports.NET discussion
Post Reply
rksaskia
Posts: 58
Joined: Fri Apr 27, 2012 9:16 am

Oracle Managed Driver, no varchar Params in Query

Post by rksaskia »

Hello,

we use the Oracle.ManagedDataAccess.dll to connect to Oracle.

We define a parameter for sql query, every parameter for varchar fields throws an exception.

Oracle_Param1.png
Oracle_Param1.png (64.56 KiB) Viewed 2337 times
Oracle_Param2.png
Oracle_Param2.png (40.12 KiB) Viewed 2337 times
Oracle_Param3.png
Oracle_Param3.png (15.75 KiB) Viewed 2337 times
bei OracleInternal.ServiceObjects.OracleCommandImpl.VerifyExecution(OracleConnectionImpl connectionImpl, Int32& cursorId, Boolean bThrowArrayBindRelatedErrors, OracleException& exceptionForArrayBindDML, Boolean& hasMoreRowsInDB, Boolean bFirstIterationDone)
bei OracleInternal.ServiceObjects.OracleCommandImpl.ExecuteReader(String commandText, OracleParameterCollection paramColl, CommandType commandType, OracleConnectionImpl connectionImpl, OracleDataReaderImpl& rdrImpl, Int32 longFetchSize, Int64 clientInitialLOBFS, OracleDependencyImpl orclDependencyImpl, Int64[] scnForExecution, Int64[]& scnFromExecution, OracleParameterCollection& bindByPositionParamColl, Boolean& bBindParamPresent, Int64& internalInitialLOBFS, OracleException& exceptionForArrayBindDML, Boolean isDescribeOnly, Boolean isFromEF)
bei Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)
bei Oracle.ManagedDataAccess.Client.OracleDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
bei System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
bei Stimulsoft.Report.Dictionary.StiSqlSource.RetrieveData(Boolean schemaOnly)
bei Stimulsoft.Report.Dictionary.StiSqlAdapterService.ConnectDataSourceToData(StiDictionary dictionary, StiDataSource dataSource, Boolean loadData)
bei Stimulsoft.Report.Dictionary.StiDataSource.Connect(StiDataCollection datas, Boolean loadData)
bei Stimulsoft.Report.Dictionary.Design.StiDataStoreSourceEditForm.tbRunScript_Click(Object sender, EventArgs e)

You need only a Table with varchar2 fields and used them in the report to reproduce the error.


The same situation at sql server works perfect, what ist wrong with Oracle?

Greetings
Attachments
Report.mrt
(9.03 KiB) Downloaded 268 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Oracle Managed Driver, no varchar Params in Query

Post by Alex K. »

Hello,

For Oracle you should use ":Param" instead "@Param".

Code: Select all

"SELECT * FROM Emp WHERE Job = :pJob"
Thank you.
0001.PNG
0001.PNG (101.11 KiB) Viewed 2335 times
0002.PNG
0002.PNG (99.16 KiB) Viewed 2335 times
0003.PNG
0003.PNG (116.77 KiB) Viewed 2335 times
rksaskia
Posts: 58
Joined: Fri Apr 27, 2012 9:16 am

Re: Oracle Managed Driver, no varchar Params in Query

Post by rksaskia »

Hello,

ok, thanks for this solution. Please update your documentation.

Greetings
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Oracle Managed Driver, no varchar Params in Query

Post by Alex K. »

Hello,

We are always glad to help you!

We will try to update in the near future.

Thank you.
Post Reply