View Single Post
  #4 (permalink)  
Old December 23rd, 2004, 01:21 AM
nashnash nashnash is offline
Authorized User
 
Join Date: Sep 2004
Location: , , .
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to nashnash
Default


that can be datareader or dataset depends upon your requirement.
like this

--DataReader------------------
SqlDataReader myReader = CommandName.ExecuteReader(CommandBehavior.Sequenti alAccess);

while (myReader.Read())
{
  Response.write(myReader["Columnanme"].toString());
}
myReader.Close()

---Dataset----
Dataset ds=new Dataset();
SqlDataAdapter cmd1 = new SqlDataAdapter("select * from stock",connection object);
cmd1.Fill(ds,"stock");

now your dataset is filled with records.You can just bind to any controls.

Thanks
Nash