at run time i added data no error found bt data are not inserted into table..
when i try to load data from dataset to datagrid i found connection is not establishd.
how to write querystring?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Sam HobbsRank #107 · 20.5K reputationPosted Jan 19, 2010, 11:45 AM EST
0
In the Solution Explorer, expand the folder for Properties. Double-click on Settings.Settings. You will get a form with fields for name, type, scope and value. Set the name, then set the type to Connection. I think you will want to set the scope to application. Then in the value, click or double-click the down arrow or whatever the icon is at the far right. You will get a dialog for creating a connection string. Then in your program, use Properties.Settings.Default.name (where name is the name you used in the proerties) to get the connection string.
0
Dipa AhujaRank #1,168 · 1.5K reputationPosted Jan 21, 2010, 12:09 AM EST
0
hey... Thank you for reply...
my problem was query string i wrote querystring like
Sam HobbsRank #107 · 20.5K reputationPosted Jan 19, 2010, 11:45 AM EST
Dipa AhujaRank #1,168 · 1.5K reputationPosted Jan 21, 2010, 12:09 AM EST
my problem was query string i wrote querystring like
bt it was like
string con = "Server=.\\SQLEXPRESS;Database=db1.mdf;Trusted_Connection=True;";