Working with VB.net
I have a Web Service that needs to accept a dataset.
Once that dataset is accepted... it needs to process the dataset....it needs to...
update the existing rows and add any new rows to the database
The dataset has these following fields
Database is sands
Table is rec_type
Public Class Retrieve
Dim dsn As String = "Data Source = RECYCLE.milllane.local:Ini
tial Catalog=Sands:Intergrated Security=SSPI"
Dim myConn As SqlClient.SqlConnection = New SqlClient.SqlConnection(ds
pdates Clients Features.")> _
Public Function UpdateFeatures(ByVal myDS As DataSet) As DataSet
Dim myDA As SqlDataAdapter = New SqlDataAdapter
myDA.UpdateCommand = New SqlCommand("Update Rec_Types Set rec_Text = @recText, button_Color_1 = @buttonColor1, button_Color_2 = @buttonColor2, button_Color_3 = @buttonColor3, rec_Value = @recValue Where id = @recID", myConn)
This is what I have so far...
I have seen the dataset and there are updates to 16 rows and the creation of 2 new rows in the table that need to be made.
I think the above will address the updates to the 16 rows ( will I need to put that in a loop) and how would the code look for adding 2 rows to the database.
Not quite sure how to read down through the dataset and take that data and place it in the database.
Also once the updates/additions are made ..I need to send back a message "Done" to the client ...which I could have either as a message box or display in a label on the form.
Any help or insight would be great.