V
VB Programmer
I have a SqlDataSource I setup on an ASP.NET 2.0 webform.
I setup the SELECT statement and it has 1 parameter, @ProductId.
How do I, using VB.NET, store the results of that SELECT statement into a
datatable or dataview, for example?
Here's partial code...
Dim ds As New DataSet
Dim dv As New DataView
For Each i As CartItem In Profile.MyShoppingCart.CartItems
' SET THE SELECT PARAMETER
Me.sdsFreeShip.SelectParameters("ProductId").DefaultValue =
i.ID.Trim
' ERROR HERE... TRYING TO GET RESULTS OF SELECT AND STORE IT IN
dv VAR
' (Argument not specified error)
dv = Me.sdsFreeShip.Select
If dv.Table.Rows.Count = 0 Then
' include in total
MyTotal += i.Price * i.Quantity
End If
Next
Thanks
I setup the SELECT statement and it has 1 parameter, @ProductId.
How do I, using VB.NET, store the results of that SELECT statement into a
datatable or dataview, for example?
Here's partial code...
Dim ds As New DataSet
Dim dv As New DataView
For Each i As CartItem In Profile.MyShoppingCart.CartItems
' SET THE SELECT PARAMETER
Me.sdsFreeShip.SelectParameters("ProductId").DefaultValue =
i.ID.Trim
' ERROR HERE... TRYING TO GET RESULTS OF SELECT AND STORE IT IN
dv VAR
' (Argument not specified error)
dv = Me.sdsFreeShip.Select
If dv.Table.Rows.Count = 0 Then
' include in total
MyTotal += i.Price * i.Quantity
End If
Next
Thanks