here it is:
SqlCommand cmd = new SqlCommand(" SELECT RFIDtag, Title, Author, Description, 1 AS QuerySource
FROM Library.dbo.books
WHERE RFIDtag in (SELECT tags FROM Library.dbo.readertags)
Union all
SELECT RFIDtag, Title, Author, Description, 2 AS QuerySource
FROM Library.dbo.RentedBooks
WHERE RFIDtag in (SELECT tags FROM Library.dbo.readertags); ", UGIcon);
SqlDataAdapter da1 = new SqlDataAdapter(cmd);
DataTable ds = new DataTable();
da1.Fill(ds);
dataGridView1.DataSource = ds;
mod edit
how can i display the second query in red?

New Topic/Question
Reply



MultiQuote




|