From 0c3e6768b8bb8b9a77e1735a800dc8166061e008 Mon Sep 17 00:00:00 2001 From: Richard Dingwall Date: Mon, 2 Apr 2012 19:40:32 +0100 Subject: [PATCH] Removed unnecessary decimal cast that was causing exceptions with null values - Convert.ToInt64 will handle that already. (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 cfb25c1b..67962fa2 100644 --- a/product/roundhouse.databases.oracle/OracleDatabase.cs +++ b/product/roundhouse.databases.oracle/OracleDatabase.cs @@ -132,7 +132,7 @@ public override long insert_version_and_get_version_id(string repository_path, s run_sql(insert_version_script(), ConnectionType.Default, insert_parameters); var select_parameters = new List> { create_parameter("repository_path", DbType.AnsiString, repository_path, 255) }; - return Convert.ToInt64((decimal)run_sql_scalar(get_version_id_script(), ConnectionType.Default, select_parameters)); + return Convert.ToInt64(run_sql_scalar(get_version_id_script(), ConnectionType.Default, select_parameters)); } public override void run_sql(string sql_to_run, ConnectionType connection_type)