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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

populate text box with sql

Status
Not open for further replies.

davedizzle15

Technical User
Feb 28, 2007
14
US
does anyone know how to populate a text box with an sql query using .net 1.1?
 
this might give you a clue how to populate a text box

'create a new dataset to hold our data
Dim myDataSet As New DataSet


'fill the dataset with the result of our query from the specified command
myAdapter1.Fill(myDataSet, "phldetail")

'Bind the DataSet to the GridView
gvphldetail.DataSource = myDataSet
gvphldetail.DataBind()
lblsp.Text = myDataSet.Tables("phldetail").Rows(0).Item("columnname").ToString()
 
is this also possible to do with a formview in microsoft web developer?
 
yes but since the textbox will be within the formview, you will have to use the findcontrol() method to find the control first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top