Display SQL query results in Windows Form
-
Hi im executing a sql command from my C# windows form. Its a count command : SELECT [COLUMN NAME], COUNT(*) FROM [DATABASE] GROUP BY [COLUMN]. 2 Columns load from the results, the column name, and the number of records (count). How can i display these results in a C# windows form? Datagrid, large textbox? Please help me on this.
-
Hi im executing a sql command from my C# windows form. Its a count command : SELECT [COLUMN NAME], COUNT(*) FROM [DATABASE] GROUP BY [COLUMN]. 2 Columns load from the results, the column name, and the number of records (count). How can i display these results in a C# windows form? Datagrid, large textbox? Please help me on this.
hobbsieoz wrote:
Datagrid
Did you check out http://www.albahari.com/queryexpress.html[^]? This is a free open-source Windows Forms SQL Query Tool and it can help out a lot in Windows forms and SQL plays.
Vasudevan Deepak Kumar Personal Homepage Tech Gossips
-
hobbsieoz wrote:
Datagrid
Did you check out http://www.albahari.com/queryexpress.html[^]? This is a free open-source Windows Forms SQL Query Tool and it can help out a lot in Windows forms and SQL plays.
Vasudevan Deepak Kumar Personal Homepage Tech Gossips
-
Hi im executing a sql command from my C# windows form. Its a count command : SELECT [COLUMN NAME], COUNT(*) FROM [DATABASE] GROUP BY [COLUMN]. 2 Columns load from the results, the column name, and the number of records (count). How can i display these results in a C# windows form? Datagrid, large textbox? Please help me on this.
You can easily displyed it with in DataGrid. Just connect with database Create DataAdapter (SqlDataAdapter da=new SqlDataAdapter(Command,Connection)) Create a Dataset (e.g Dataset Ds=new DataSet()) Fill DataSet With DataAdpter (e.g Da.Fill(ds)) And DataGrid1.DataSource=Ds Hope This will help :cool:
Happy Programming ----------------- Abhijit Jana Noida, India
-
You can easily displyed it with in DataGrid. Just connect with database Create DataAdapter (SqlDataAdapter da=new SqlDataAdapter(Command,Connection)) Create a Dataset (e.g Dataset Ds=new DataSet()) Fill DataSet With DataAdpter (e.g Da.Fill(ds)) And DataGrid1.DataSource=Ds Hope This will help :cool:
Happy Programming ----------------- Abhijit Jana Noida, India
-
why not ?:doh: What error r u getting :confused:
Best Regards ----------------- Abhijit Jana View My CodeProject Articles "Success is Journey it's not a destination"