Murray Brown
asked on
ASP.net merge two datasets
Hi
What is the easiest way to merge two datasets that have the same first two columns, and that are created using code like the following
Function GetData(ByVal queryString As String) As DataSet
Dim cs As String = ConfigurationManager.Conne ctionStrin gs("survey _conn").Co nnectionSt ring
Dim myConnection As SqlConnection = New SqlConnection(cs)
Dim ds As New DataSet()
Try
' Connect to the database and run the query.
Dim adapter As New SqlDataAdapter(queryString , myConnection)
' Fill the DataSet.
Adapter.Fill(ds)
Catch ex As Exception
' The connection failed. Display an error message.
Me.Label_Error1.Text = "Unable to connect to the database." & Err.Description
End Try
Return ds
End Function
What is the easiest way to merge two datasets that have the same first two columns, and that are created using code like the following
Function GetData(ByVal queryString As String) As DataSet
Dim cs As String = ConfigurationManager.Conne
Dim myConnection As SqlConnection = New SqlConnection(cs)
Dim ds As New DataSet()
Try
' Connect to the database and run the query.
Dim adapter As New SqlDataAdapter(queryString
' Fill the DataSet.
Adapter.Fill(ds)
Catch ex As Exception
' The connection failed. Display an error message.
Me.Label_Error1.Text = "Unable to connect to the database." & Err.Description
End Try
Return ds
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER