【发布时间】:2011-05-04 13:58:22
【问题描述】:
我正在使用 c# 连接到 sql server。如何在 winform 上显示以下查询的结果?我想在控件中显示此数据集。我相信它应该是一个数据图表,但这对我来说并不重要。
// Initialize a connection string
string myConnectionString = "Provider=SQLOLEDB;Data Source=hermes;" +
"Initial Catalog=qcvaluestest;Integrated Security=SSPI;";
// Define the database query
string mySelectQuery = "select top 500 name, finalconc " +
"from qvalues where rowid between 0 and 25000";
在 winform 上显示此查询结果的最佳方式是什么?
【问题讨论】:
标签: c# .net sql sql-server-2008 select