From 3774c3024a8369cb2053eea61abc95c5420c9daa Mon Sep 17 00:00:00 2001 From: Richard Dingwall Date: Mon, 2 Apr 2012 19:38:17 +0100 Subject: [PATCH] Fixed an 'ORA-01008: not all variables bound' error where null was being passed instead of DbNull.Value (issue #58) --- product/roundhouse.databases.oracle/OracleDatabase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product/roundhouse.databases.oracle/OracleDatabase.cs b/product/roundhouse.databases.oracle/OracleDatabase.cs index f2df4ad2..b2924f21 100644 --- a/product/roundhouse.databases.oracle/OracleDatabase.cs +++ b/product/roundhouse.databases.oracle/OracleDatabase.cs @@ -172,7 +172,7 @@ private IParameter create_parameter(string name, DbType type, parameter.Direction = ParameterDirection.Input; parameter.ParameterName = name; parameter.DbType = type; - parameter.Value = value; + parameter.Value = value ?? DBNull.Value; if (size != null) { parameter.Size = size.Value;