DataSet ds = new DataSet(); string selectSql = "Items.Description, Items.ItemNo, Items.Qty FROM Items INNER JOIN ItemParent ON Items.DoNumber = ItemParent.DoNumber"; string connectionString = ConfigurationManager.ConnectionStrings["InvoiceConnectionString"].ConnectionString; SqlConnection conn = new SqlConnection(connectionString); SqlDataAdapter da = new SqlDataAdapter(selectSql,conn); da.Fill(ds,"Items"); PrintGv.DataSource = ds.Tables["Items"];
Use "Select"
string selectSql = "Select * from login"; //continue ur code
<a href="http://www.java2s.com/Code/SQLServer/Select-Query/CatalogSelect-Query.htm">Refer Sql Queries</a>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)