SqlDataReader rdr = null;
SqlConnection sqlcon = new SqlConnection("Server=___;Initial Catalog=____;Integrated security=true");
sqlcon.Open();
SqlCommand cmd1 = new SqlCommand("select * from ____;", sqlcon);
rdr = cmd1.ExecuteReader();
while (rdr.Read())
{
string ___ = rdr.GetString(rdr.GetOrdinal("column name"));
string ___ = rdr.GetString(rdr.GetOrdinal("column name"));
}
sqlcon.Close();
Saturday, November 14, 2009
To retrieve table data using table column in asp.net,C#
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment