Yes LIZr I have 2 DataSets And i Have Merged Them through Merge method of datasets. But Still I m not getting my result
I have Tried following
ds1.Merge(ds2);
dataGridView1.DataSource = ds1.Tables[0].DefaultView;
string connstr = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Resources\DBMYC.mdf;Integrated Security=True;User Instance=True";
SqlConnection con = new SqlConnection(connstr); //SqlCommand cmd = sqlConnection1.CreateCommand();
SqlCommand cmd = con.CreateCommand();
cmd.CommandType = CommandType.Text; //this has the option of caling a stored procedure
cmd.CommandText = "THE SQL QUERY FOR THE SELECTION FROM TWO TABLES OR MORE";
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
//DataSet ds = new DataSet();
//da.Fill(ds, "MYCTAB");
DataTable DT = new DataTable(); //USES DATATABLE INSTEAD OF DATASET
DT.Locale = System.Globalization.CultureInfo.InvariantCulture;
da.Fill(DT);
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.