【发布时间】:2012-12-28 16:39:18
【问题描述】:
如何将 access db 中的数据添加到 wpf 数据网格。我曾尝试使用数据表作为数据源,但它给出了一个错误。我也尝试过使用 itemsource 而不是 datasource ,就像一些消息来源建议的那样,但徒劳无功。实际上我在用代码填充我的数据表后被卡住了:
`Dim da As New OleDb.OleDbDataAdapter("SELECT activitynm as [Activity],motonum as [Car No], " & _
"startmile as [Start mileage],stopmile as [Stop mileage],proj_code as [Project]," & _
"ac_code as [Account code],month(miledate) as [Project month], year(miledate) as [Project year]" & _
" from carmileage where ac_code='""'", cnn2)
Dim dt As New DataTable
'fill data to datatable
da.Fill(dt)
//What to put here is the problem`
有人有线索。请帮忙
【问题讨论】:
标签: vb.net ms-access wpfdatagrid