Link to home
Start Free TrialLog in
Avatar of jfsedlar3rd
jfsedlar3rdFlag for United States of America

asked on

VB.NET Updating a Data Table

I am writing a vb.net app using vs. 2003(.net1.1) I have a data table that I am populating based on a query. After the Data table has been filled I have another loop that iterates through each column of the data table and compares the name to a select case statement where it will then check the value. If it matches I need to be able to run updates on the data table to only a single item. Can someone help me with the code to run an update on the data table?
Avatar of jfsedlar3rd
jfsedlar3rd
Flag of United States of America image

ASKER

This is what i have so far:

Dim ColumnName As String

            For i = 0 To dt.Rows.Count
                For Each col In dt.Columns
                    ColumnName = col.ColumnName.ToString

                    Select Case ColumnName
                        Case "Middle Initial"
                           'Perform Update here
                           
                    End Select
                Next col
            Next
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial