Frnds, The problem got solved.... Thank all 4 ur valuable replies. On Wed, May 5, 2010 at 2:32 PM, Jamie Fraser <[email protected]> wrote:
> rd= cms.ExecuteNonQuery(); > > Should be > > rd = cmd.ExecuteReader(); > > On Mon, May 3, 2010 at 12:42 PM, Alen Alexander <[email protected]> > wrote: > > Frnds, > > My Web page contains multiple Label controls(10 in total). I want to fill > > all those controls with the values extracted from database. > > But corresponding labels are not getting filled with Right data from > > database. > > I am using ASP.NET with C# and SQL Server 2005. > > My Code for getting values are.. > > cmd = new SqlCommand("select * from mid_zone where p_id=2"); > > rd= cms.ExecuteNonQuery(); > > while(rd.Read()) > > { > > //reading values > > } > > Please help... > > Thanks in Advance > > -- > > > > > -- Alen Some people have hundreds of reason why they cannot do what they want to, when all they need is one reason why they can!!!!
