Today I've found a bug in Timestamp with time zone Parameter handling:
At first create the following Stored Procedure in your DB, it doesn't need to do anything:
Code: Select all
CREATE OR REPLACE PROCEDURE ORA8192SAMPLE (
P_TIMESTAMP TIMESTAMP WITH TIME ZONE
)
IS
BEGIN
null;
END;
Code: Select all
string connectionString = "Data Source=YOURSERVER;User Id=YOURUSER;Password=YOURPASS";
string commandText = "ORA8192SAMPLE";
using (OracleConnection connection = new OracleConnection(connectionString))
{
connection.Open();
using (OracleCommand commandFailing = connection.CreateCommand())
{
commandFailing.CommandText = commandText;
commandFailing.CommandType = CommandType.StoredProcedure;
commandFailing.PassParametersByName = true;
commandFailing.Parameters.Add("P_TIMESTAMP", OracleDbType.TimeStampTZ);
commandFailing.Parameters["P_TIMESTAMP"].OracleValue = new OracleTimeStamp(DateTime.MinValue);
commandFailing.ExecuteNonQuery();
} connection.Close();
}
Problem seems to be with TimeStampTZ, if the param is changed to TimeStamp everything works fine (or raises the correct/expected errors and problems).
Tests were done with Devart 7.7, Ora 11.2.0.3 client/server;
BR