IsNullOrEmpty not working correctly
Posted: Tue 25 Aug 2009 14:32
Hello,
it's nice that method string.IsNullOrEmpty() was implemented. However, it's not working correctly in dotConnect for MySQL 5.40.39.
Following code:
is translated into this SQL code:
It's wrong. The condition should be:
Thanks for attention.
it's nice that method string.IsNullOrEmpty() was implemented. However, it's not working correctly in dotConnect for MySQL 5.40.39.
Following code:
Code: Select all
from eq in DB.ExamQuestions
where string.IsNullOrEmpty(eq.Question)
select eq.Question
Code: Select all
SELECT t1.Question
FROM db.exam_question t1
WHERE t1.Question IS NULL
Code: Select all
WHERE t1.Question IS NULL OR t1.Question = ''