Explain how to load multiple tables in a DataSet

Explain how to load multiple tables in a DataSet.

MyDataSet myds = new MyDataSet();

SqlDataAdapter myda = new SqlDataAdapter ("procId", this.Connection);
myda.SelectCommand.CommandType = CommandType.StoredProcedure;
myda.SelectCommand.Parameters.AddWithValue ("@pId", pId);
myda.TableMappings.Add ("Table", myds.xval.TableName);
myda.Fill (myds);

ADO.NET Code showing Dataset storing multiple tables.
DataSet ds = new DataSet();
ds.Tables.Add(dt1);
ds.Tables.Add(dt2);
ds.Tables.Add(dtn);
What is the use of CommandBuilder?
CommandBuilder builds Parameter objects automatically...
Difference between Optimistic and Pessimistic locking
In pessimistic locking, when a user opens a data to update it, a lock is granted..
What is connection pooling and what is the maximum Pool Size in ADO.NET Connection String?
A connection pool is created when a connection is opened the first time...
Post your comment