Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataBind to a Textbox

Status
Not open for further replies.

Dross

Programmer
Aug 16, 2001
212
US
I ran a stored procedure that executed correctly (I know this because I bound the data to a datagrid to test, but now I want to bind them to textboxes. I want to bind them using the order they are in the row, so I know it is something like DS.Tables("Territory").Rows.item, but I am not sure of the exact syntax. Can someone help me out?

So far I have it as:
oConn.Open()
DA.SelectCommand.ExecuteReader()
oConn.Close()
DA.Fill(DS, "Territory")


and now I want to bind each item in my table to the text boxes.
 
try using a datareader...

dim dr as datareader = DA.SelectCommand.ExecuteReader()
while dr.read()
textbox1.text = dr.item(0)
textbox2.text = dr.item(1)
end while

hth,
drew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top