Here would be the code to fill a DataSet with all of the information from the table above: x_vb.net 複製 Dim ds As New DataSet Dim da As New SqlDataAdapter Dim conn As New SqlConnection Dim cmd As New SqlCommand Try 'Open a connection to the database conn.ConnectionString = "...
This created a separate instance and allowed it to work properly. Another solution if you really had to use the same DataSet object, would have been to assign the new data from the .Fill() method into a separate DataTable within the DataSet. This can be done by passing an additional ...