MySQL Forums
Forum List  »  MySQL for Visual Studio

Difficulty Level: HIGH (MySQL query doesn't work on Visual Studio query builder
Posted by: Jefferson Brazil
Date: March 07, 2018 09:55PM

Need help on SQL query for my rdlc reporting file in visual studio. I have a BAR chart which displays the total patient collections but my chart displays all the data in specific dates and not according to group dates. My script does work in mysql workbench

Here is my script from the query builder in Visual Studio 2015:

SELECT COUNT(*) AS total_exam, DATE(labcollect) AS collecteddate
FROM labinpat
WHERE (labcollect BETWEEN ? AND ?)
GROUP BY DATE(labcollect)

But an error appear afterwards:

Error: sql execution error.

Error[07002][MySQL][ODBC 3.51 Driver][mysql-5.0.45-community-nt]SQLBindParameter not used for all parameters

BUT this one works fine but doesnt get the result I wanted:

SELECT COUNT(*) AS total_exam, labcollect AS collecteddate
FROM labinpat
WHERE (labcollect BETWEEN ? AND ?)
GROUP BY labcollect


I have this code in my printpreview.cs:

labcolltableadapter.Fill(lablogsheet.Labcoll, _fromdtp1.value, _todtp1.value);
reportviewer2.RefreshReport();
I have parameters in dataset Labcoll: Fill,GetData(labcollect, labcollect1)

Options: ReplyQuote


Subject
Views
Written By
Posted
Difficulty Level: HIGH (MySQL query doesn't work on Visual Studio query builder
525
March 07, 2018 09:55PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.