SQL Query depending on a Winform control. C#, VS2010 -
i new c#, , trying make winform app, having problem search database depending upon text entered in textbox.
i have added gridview, when adding new query, should clause able use data winform controls?
also need change fill table call ?
and there books may cover amount of similar topic,i.e,working databases in c# winforms?
thank all, in advance..
you should making stored procedure query , supply value textbox.text field stored procedure.
this other question might c# syntax: how execute stored procedure within c# program
and assuming you're trying out sql server express, should setup query stored procedure: http://msdn.microsoft.com/en-us/library/ms345415.aspx
otherwise if you're going basic sql in winform, want run query based on user pressing button rather "textchanged" event on textbox:
string querystr = "select * "+ "from my_table "+ string.format("where my_value = '{0}'", textbox1.text);
Comments
Post a Comment