I guess I should have done a little more searching first as I found an answer using CommandBuilder
Dim commandBuilder As New SqlCommandBuilder(da)
If dt.Rows.Count = 0 Then
dr = dt.NewRow()
dt.Rows.Add(dr)
da.InsertCommand = commandBuilder.GetInsertCommand(True)
Else
dr = dt.Rows(0)
da.UpdateCommand = commandBuilder.GetUpdateCommand(True)
End If
I've also added constants for my Table/Column names for easier maintenance and am now using queries with parameters.
Const commandText As String = "select * from " & Table.Name & " where " & Table.Column1 & " = @Value1 AND " & Table.Column2 & " = @Value2"
Dim sqlCommand As New SqlCommand(commandText, _connection)
sqlCommand.Parameters.Add("@Value1", SqlDbType.Type).Value = value1
sqlCommand.Parameters.Add("@Value2", SqlDbType.Type).Value = value2
This should be a bit better but I'm still open to more suggestions if you still want to comment.