Exception when setting boolean parameter for Oracle
Brought to you by:
fral
I am using the following line of code to set a parameter
in a stored procedure
MpmParameter invalidParam =
daStreet.SelectCommand.Parameters.Add
("@bInvalidOnly", MpmType.Boolean, 1);
When run against SQL Server this works fine, but when
run against an Oracle database I get the following
exception
"Value does not fall within the expected range."
Logged In: YES
user_id=897766
Oracle does not support a Boolean data type. You get an
ArgumentException from Oracle when Mpm tries to set
OracleParameter.DbType to DbType.Boolean. The error message
from Oracle is unfortunately not very informative...
Logged In: YES
user_id=897766
A new version that wraps the ArgumentException and adds a
more informative error message have been commited to CVS.