I'm evaluating MyDirect.NET and stuck with strange problem.
I was using document http://www.devart.com/mysqlnet/docs/Parameters.html
But no matter what I'm doing - in case I'm calling command.Prepare() - after that MySQL 5.1 Embedded doesn't see any parameter value (it's seeing NULL). But without Prepare() it's quite visible that performance is poor.
I have tried all possible things (and found that the problem is in Prepare), but nothing helps to stay with Prepare. Could you help me on that?
Code: Select all
MySqlCommand intQuery = con.CreateCommand(); intQuery.CommandText = "SELECT T1.i,T1.s FROM TestIndex as T1 WHERE T1.i = :param"; intQuery.Parameters.Add(new MySqlParameter(":param", MySqlType.BigInt)); //It doesn't matter if param without ":" or with "@" or unnamed at all. //intQuery.Prepare(); // Uncomment this - and nothing works on same DB intQuery.Parameters.Value = key; reader = intQuery.ExecuteReader(); bool found = reader.Read();
Now, "found" always == false (no matter what's in Value) if I'm calling Prepare(). And always == true without Prepare (and correct value).
That's definetly a problem somewhere in provider. But I don't have sources and don't want to decompile DLL.
Will be very glad for any real help.
Spent a lot of time with it already.
Best Regards. Max