List:MySQL and .NET« Previous MessageNext Message »
From:Reggie Burnett Date:October 3 2005 7:25pm
Subject:RE: Comments in MySqlCommand.CommandText ?
View as plain text  
Pyt

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

-Reggie 

> -----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
> \g
> create procedure proc_name()
> begin
>  ... sql statement list...
>  /* here a comment with a ? in it */
>  ... more sql statements...
> end
> \g
> 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 ?
> 
> Thanks,
> 
> Pyt.
> 

Thread
Comments in MySqlCommand.CommandText ?Pyt21 Sep
  • RE: Comments in MySqlCommand.CommandText ?Reggie Burnett3 Oct
    • Re: Comments in MySqlCommand.CommandText ?Pyt4 Oct