4
Reply

Query with paramters, mysql and Windows Forms

Pascal Hudon

Pascal Hudon

Apr 18 2010 11:54 PM
2.2k
Hi,

I'm coding a windows application which use mysql db. It's similar to a helpdesk system (electronic service request we call it).

When the user has fill all field, the request is insert in db. I have a button so the user can see his history (active request). To do so, I use the wizard, and create a query (in designer) to accept a parameter (the user name). When I run my application, the datagridview was empty because the query doesn't work in C# (VS 2008). I try the query in MySQL Query Browser and it work, if the parameter is with quote " "  .   Is there a way to make my query work in C# with the designer or how do I have to pass the parameter so the query work ?

Thank you.

Answers (4)