How to merge tables in a Dataset - OLEDB Data Source
The DataSet contains copy of the data we requested through the SQL statement. The OleDbDataAdapter object allows us to populate DataTable in a DataSet. We can use Fill method in the OleDbDataAdapter for populating data in a Dataset. We can populate Dataset with more than one table at a time using OleDbDataAdapter Object. The DataTableCollection contains zero or more DataTable objects. In some situation we want to combine the result of multiple SQL query results as a single result set. In that case we can use the Dataset's Merge method for doing this. The tables involved in the merge should be identical. The following VB.NET source code shows how to merge the tables from two different dataset.
connetionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Your mdb filename;"
firstSql = "Your First SQL Statement Here"
secondSql = "Your Second SQL Statement Here"
You have to replace the string with your real time variables.
- What is ADO.NET Dataset
- How to Dataset with Sql Server
- How to Dataset with OLEDB Data Source
- Search Tables in a Dataset Sql Server
- Search Tables in a Dataset OLEDB Data Source
- Dataset table row count in SQL Server
- Dataset table row count - OLEDB Data Source
- How to find column definition - Sql Server
- How to find column definition - OLEDB Data Source
- How to create DataSet without Databse
- How to multiple tables in Dataset - Sql Server
- How to multiple tables in Dataset - OLEDB Data Source
- How to add relations between tables in a Dataset
- How to merge tables in a Dataset - Sql Server
- How to populate a combo box from a dataset in VB.Net , binding combobox with enum values , binding combobox with dictionary values
- how many tables exist in a database - VB.NET