SqlDataReader rdr = objCon.GetData("SP_BudgetID");


while (rdr.Read())
{


txtBudgetID.Text = rdr.GetSqlInt(64);


}

i m getting an exception
hw is it possbile to assign values from dataeader to the control like texbox

and i want to assign these value into an array.
wat is the way of doing it

put it in the array not the edit text box... like you wanted..

I believe the syntax is retVal=rdr.GetSqlInt64(column);(column is zero based.)
retVal is of type SqlInt64 and it should have a ToStringmethod(have not tested that) so it can be assigned to your textbox.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.