D
Dan Sikorsky
How do you iterate thru a dataset to change money fields to a different
value?
Here's what I have. My dataset is filled directly from a stored procedure.
' Create Instance of Connection and Command Object
Dim myConnection As SqlConnection = New
SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
Dim myCommand As New SqlDataAdapter("OrdersList", myConnection)
' Mark the Command as a SPROC
myCommand.SelectCommand.CommandType = CommandType.StoredProcedure
' Create and Fill the DataSet
Dim myDataSet As New DataSet()
myCommand.Fill(myDataSet, "OrderList")
Dim drow As DataRow
For Each drow In myDataSet.Tables("OrderList").Rows
drow.BeginEdit()
drow.Item("OrderTotal") += 6
drow.EndEdit()
drow.AcceptChanges()
Next
value?
Here's what I have. My dataset is filled directly from a stored procedure.
' Create Instance of Connection and Command Object
Dim myConnection As SqlConnection = New
SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
Dim myCommand As New SqlDataAdapter("OrdersList", myConnection)
' Mark the Command as a SPROC
myCommand.SelectCommand.CommandType = CommandType.StoredProcedure
' Create and Fill the DataSet
Dim myDataSet As New DataSet()
myCommand.Fill(myDataSet, "OrderList")
Dim drow As DataRow
For Each drow In myDataSet.Tables("OrderList").Rows
drow.BeginEdit()
drow.Item("OrderTotal") += 6
drow.EndEdit()
drow.AcceptChanges()
Next