how can we display records in single datagrid using two
datasets in different place?

Answer Posted / nitin jadav

OracleConnection cn = new OracleConnection("user
id=scott;password=tiger;data source=ganesh1");
OracleDataAdapter da1 = new
OracleDataAdapter("select * from table1", cn);

DataSet ds = new DataSet();
da1.Fill(ds, "temp");

OracleDataAdapter da2 = new
OracleDataAdapter("select * from table2", cn);
DataSet ds1 = new DataSet();
da2.Fill(ds1, "temp");

ds.Merge(ds1);
dataGridView1.DataSource = ds.Tables[0].DefaultView;
label1.Text = ds.Tables[0].Rows.Count.ToString();

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is the best institute to learn Microsoft Technologies and the faculty if you Know?

1586


How many languages are supported by .NET at present time?

259


In Code-Behind class which kind of code (server or client) is found ?

577


What is asp short for?

527


Where are session variables stored?

490






Explain the use of duration attribute of @outputcache page directive.

601


How long should a session id be?

503


Explain how cookies work. Give an example of cookie abuse.

693


What is a user session?

482


What describes a query?

505


What is the use of express session?

515


What is enableviewstate?

518


Explain the difference between dataset and datareader.

506


Where do the cookie state and session state information be stored?

485


Describe the differences between the lifecycles of Windows services and Standard EXE?

578