Comments in the command text is a feature that I implemented for the 5.x
branch. I'll consider back porting it to 1.x
> -----Original Message-----
> From: Pyt [mailto:py.thoulon@stripped]
> Sent: Wednesday, September 21, 2005 7:20 AM
> To: dotnet@stripped
> Subject: Comments in MySqlCommand.CommandText ?
> I'm trying to create a stored procedure through the connector
> (v1.0.5); I define the CommandText property of a MySqlCommand as:
> cmd.CommandText = @"
> delimiter '//';
> drop procedure if exists proc_name
> create procedure proc_name()
> ... sql statement list...
> /* here a comment with a ? in it */
> ... more sql statements...
> delimiter ';'//
> followed by a cmd.ExecuteNonQuery(), which throws an
> exception, complaining that "Parameter '?' must be defined".
> As the '?' is within a comment, I would normally expect the
> parser to ignore it, but this is apparently not the case.
> Comments, anybody ?