我想填充數據表中的sp。但它似乎不正確。我的做法任何想法如何從LINQ存儲過程填充DataSet或DataTable?
Dim dt As New DataTable
Using EdSQL As New MyEntities
Dim Query = From St In EdSQL.MySp(Prameter).AsEnumerable
Select St
dt=Query.......
End Using
我想填充數據表中的sp。但它似乎不正確。我的做法任何想法如何從LINQ存儲過程填充DataSet或DataTable?
Dim dt As New DataTable
Using EdSQL As New MyEntities
Dim Query = From St In EdSQL.MySp(Prameter).AsEnumerable
Select St
dt=Query.......
End Using
我認爲你需要像這樣...
Dim EdSQL As New My Entities
Dim query = From st In EdSQL.MySp(Parameter).AsEnumerable
Select St
gvStockEDI.DataSource = query.ToList()
gvStockEDI.DataBind()
你什麼錯誤? – Mych
dt =查詢?????問題出現在這裏。不能將查詢分配給數據表。甚至.CopyToDataTable屬性不會彈出 – sansalk
gvStockEDI是你的gridview嗎? – Mych