1
Vote

Inline query comments are not handled properly

description

Inline query comments are not handled properly

Issue 1

select * -- Comment 1
from Table1

In Query.ExecuteQuery the first line

//queriesText = queriesText.Replace(Environment.NewLine, " ");

is replacing all new lines, which causes this problem. I am not sure why we are doing this. The query works fine if I comment the line.


Issue 2

-- Comment1
Select * from TableName

The above query does not work because we think its not a select query, because it does not begin with a select. We should either ignore the comment or use a more generic way of executing queries.

comments

kotov_a wrote Aug 8, 2011 at 11:01 AM

I fix it, please test.