I want to combine these 2 queries :
string query1 = "SELECT * FROM db1 ";
string query2 ="SELECT * FROM db2 ";
string query =query1 + query2;
The tutorial says that this works on SqlServer , but i am using Ms Access
And also the tutorial is saying that there should be a separator(but it doesn't says wich one .... ) between the queries i think something like this :
query =query1 +" ,"+ query2;
but this doesn't works .
Thanks
string query1 = "SELECT * FROM db1 ";
string query2 ="SELECT * FROM db2 ";
string query =query1 + query2;
The tutorial says that this works on SqlServer , but i am using Ms Access
And also the tutorial is saying that there should be a separator(but it doesn't says wich one .... ) between the queries i think something like this :
query =query1 +" ,"+ query2;
but this doesn't works .
Thanks
Le CoderPosted Jan 26, 2008, 8:12 AM
odbcDA.SelectCommand = new OdbcCommand(query2, odbcConn); // i will send a new //query each time i need one
DataTable dt=new DataTable();
odbcDA.Fill(dt); // and put them in a dataTable
dtc.Add(dt); // and then in the Data table Collection
//maybe this helps also other newcomers :p
Le CoderPosted Jan 25, 2008, 2:56 PM
i want to have 2 tables and put them in a DataSet from which in a DataTableCollection
and then i could manipulate them separately
Guest UserPosted Jan 25, 2008, 2:12 PM
string query1 = "select * from db1 union select * from db2"
From MSDN, the following rules apply for union statements :
Le CoderPosted Jan 25, 2008, 4:56 AM
Scott LyslePosted Jan 24, 2008, 6:33 PM