D
dave
Hi
Could someone please show me an example (vb pref) of how the hell you get
data into a text box??
I have a sub that is called on the page_load which connects to a DB and
returns one row of data, which i then want to use to populate the textboxes
on a form (details editing page).
Everything i have tried doesnt seem to work??
Here is the code for getting the data:
Sub BindUserData( )
Dim myConnection as New
SqlConnection(ConfigurationSettings.AppSettings("DBconnString"))
dim strSQL as String = "SELECT * FROM dbo.USERS WHERE dbo.USERS.ID = 1"
Dim myCommand as New SqlCommand(strSQL, myConnection)
Dim myDA as New SqlDataAdapter()
myDA.SelectCommand = myCommand
Dim myDS as New DataSet()
myDA.Fill(myDS)
End Sub
Also what is the best thing to use? Datareader or Dataset or Dataview, etc
Thanks in advance....
Could someone please show me an example (vb pref) of how the hell you get
data into a text box??
I have a sub that is called on the page_load which connects to a DB and
returns one row of data, which i then want to use to populate the textboxes
on a form (details editing page).
Everything i have tried doesnt seem to work??
Here is the code for getting the data:
Sub BindUserData( )
Dim myConnection as New
SqlConnection(ConfigurationSettings.AppSettings("DBconnString"))
dim strSQL as String = "SELECT * FROM dbo.USERS WHERE dbo.USERS.ID = 1"
Dim myCommand as New SqlCommand(strSQL, myConnection)
Dim myDA as New SqlDataAdapter()
myDA.SelectCommand = myCommand
Dim myDS as New DataSet()
myDA.Fill(myDS)
End Sub
Also what is the best thing to use? Datareader or Dataset or Dataview, etc
Thanks in advance....