什麼會顯示這條SQL語句的結果的最佳方式:把從SQL查詢信息到一個DataGridView
select "WorkOrder"."WorkOrderID", "Customer"."FirstName", "Vehicles"."Model", "WorkOrder"."State"
from "WorkOrder", "Customer", "Vehicles"
WHERE "WorkOrder"."VIN" = "Vehicles"."VIN"
AND "Vehicles"."CustomerID" = "Customer"."CustomerID"
AND "WorkOrder"."State" = 'In Progress';
我使用C#的WinForms與Visual Studio 2010中我確實不能似乎弄清楚如何把它放在DataGridView或類似的東西。有沒有辦法做或將其作弊到DataGridView?
您可以在'DataTable'中使用它,並將其分配給'DataGridView.DataSource'屬性。不記得assing'AutoGenerateColumns'到TRUE;。看看的例子,從文檔http://msdn.microsoft.com/tr-tr/library/system.windows.forms.datagridview.datasource(v=vs.110).aspx –
我怎麼會去製作一個那些? – user3169698