Switching from 6.9.5.0 to 6.9.7.0 has caused a parametrised update query to fail; removing then a newline character from the query suddenly makes it work again - which is clearly not how it's supposed to work.
Here's the code that used to work under older Connector .NET versions but fails with a 'You have an error in your SQL syntax; ..... at line 1' error using 6.9.7.0:
command.CommandText = @"
update
meter_stand
set
status=@status
,invoer=@invoer
where
id=@id";
pars.Clear();
pars.AddWithValue("@id", msId);
pars.AddWithValue("@status", 2);
pars.AddWithValue("@invoer", 1);
command.ExecuteNonQuery();
(where meter_stand is a table where the columns mentioned are integer, and pars is the command object's parameter collection, note that i'm using tab's instead of spaces for the query lines)
Now just changing the query (by just removing a newline) to the following makes the error disappear using 6.9.7.0; I'm quite sure that's not how it is supposed to work:
command.CommandText = @"
update
meter_stand
set
status=@status
,invoer=@invoer
where id=@id"; /* just removing the newline gets rid of the syntax error !! */
Now what to make of this behaviour? Using the latest MySql server btw.
Here's the code that used to work under older Connector .NET versions but fails with a 'You have an error in your SQL syntax; ..... at line 1' error using 6.9.7.0:
command.CommandText = @"
update
meter_stand
set
status=@status
,invoer=@invoer
where
id=@id";
pars.Clear();
pars.AddWithValue("@id", msId);
pars.AddWithValue("@status", 2);
pars.AddWithValue("@invoer", 1);
command.ExecuteNonQuery();
(where meter_stand is a table where the columns mentioned are integer, and pars is the command object's parameter collection, note that i'm using tab's instead of spaces for the query lines)
Now just changing the query (by just removing a newline) to the following makes the error disappear using 6.9.7.0; I'm quite sure that's not how it is supposed to work:
command.CommandText = @"
update
meter_stand
set
status=@status
,invoer=@invoer
where id=@id"; /* just removing the newline gets rid of the syntax error !! */
Now what to make of this behaviour? Using the latest MySql server btw.