Oracle string parameters showing as object

Posts: 427
Joined: 23-Jan-2005
# Posted on: 11-Jun-2019 05:47:20   

I'm trying to use ORM Profiler with EF6 and Oracle. The string parameters are all coming back as type of object. As a result, the parameter values are getting inlined.

In the sample below, the


parameter value is 'ABC01' and the p__linq__1 value is a date as shown. All other parameters seem to be correct except for any of the various character data types.

                WHERE  ((("Extent1"."IMPD_BMP_ID_FROM_USER" = /* Type: OBJECT. */ /* :p__linq__0 */)
                          OR (("Extent1"."IMPD_BMP_ID_FROM_USER" IS NULL)
                              AND (/* Type: OBJECT. */ /* :p__linq__0 */ IS NULL))) 
                        AND ("Extent1"."IMPD_INSTALLED_DATE" = '20190202' /* :p__linq__1 */)

I'm not sure if this is an issue with ORM Profiler, EF6, Oracle or a combination. I was trying to create a pure ADO.NET example but I can't figure out how to initialize the connection for that.

This query executes but doesn't get intercepted by ORM Profiler.

            var table = new DataTable();

            using (var cnn = new OracleConnection(_login))
                using (var cmd = new OracleCommand(query, cnn))
                    cmd.CommandType = System.Data.CommandType.Text;
                    var creationDate = new DateTime(2019, 1, 1);
                    cmd.Parameters.Add("CREATION_DATE", OracleDbType.Date, creationDate, ParameterDirection.Input);

                    using (var dataAdapter = new OracleDataAdapter(cmd))
                        Console.WriteLine($"Rows: {table.Rows.Count}");

Walaa avatar
Support Team
Posts: 14898
Joined: 21-Aug-2005
# Posted on: 11-Jun-2019 18:29:57   

Which ORM Profiler version are you using?

How to hook up the ORM Profiler Interceptor... check this document