From dca8ed5ff8f159822add9b6dbe71cbd95ace7c67 Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Tue, 22 Jun 2010 13:48:58 +0000 Subject: [PATCH] Fixed critical bug in ConditionCompiler (MySQLConnector) --- MySQLConnector/ConditionCompiler.cs | 2 +- MySQLConnector/Connection.cs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/MySQLConnector/ConditionCompiler.cs b/MySQLConnector/ConditionCompiler.cs index 911cc68..820cfd0 100644 --- a/MySQLConnector/ConditionCompiler.cs +++ b/MySQLConnector/ConditionCompiler.cs @@ -56,7 +56,7 @@ namespace FLocal.MySQLConnector { private string CompileCondition(MultiValueCondition condition) { List valueParams = new List(); foreach(string value in condition.values) { - valueParams.Add(this.paramsholder.Add(value)); + valueParams.Add(this.traits.markParam(this.paramsholder.Add(value))); } if(condition.inclusive) { diff --git a/MySQLConnector/Connection.cs b/MySQLConnector/Connection.cs index fbc5306..67fb385 100644 --- a/MySQLConnector/Connection.cs +++ b/MySQLConnector/Connection.cs @@ -120,7 +120,12 @@ namespace FLocal.MySQLConnector { } command.CommandText = "SELECT COUNT(*) " + queryMain; - object rawCount = command.ExecuteScalar(); + object rawCount; + //try { + rawCount = command.ExecuteScalar(); + //} catch(Npgsql.NpgsqlException e) { + //throw new FLocalException("Error while trying to execute " + command.CommandText + ": " + e.Message); + //} long count = (long)rawCount; if(count < 1) { diapasone.total = 0;