L
luna
theres no errors in my code - but it does nothing at all - its supposed to
be populating text boxes!!
any ideas ? (im am pretty new to all this)
If Not Page.IsPostBack Then
Dim search As String
Dim strConn As String =
"server=Gringotts;uid=sa;pwd=password;database=database"
Dim sql As String = "Select * from table where ID = " + userid.Text.ToString
Dim conn As New System.Data.SqlClient.SqlConnection(strConn)
Dim Cmd As New System.Data.SqlClient.SqlCommand(sql, conn)
Dim objDR As System.Data.sqlclient.SqlDataReader
conn.Open()
objDR = Cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
While objDR.Read()
'userid.Text = objDR("userid")
surname1.Text = objDR("surname1")
firstname1.Text = objDR("fname1")
Title1 = objDR("title1")
End While
Page.DataBind()
End If
be populating text boxes!!
any ideas ? (im am pretty new to all this)
If Not Page.IsPostBack Then
Dim search As String
Dim strConn As String =
"server=Gringotts;uid=sa;pwd=password;database=database"
Dim sql As String = "Select * from table where ID = " + userid.Text.ToString
Dim conn As New System.Data.SqlClient.SqlConnection(strConn)
Dim Cmd As New System.Data.SqlClient.SqlCommand(sql, conn)
Dim objDR As System.Data.sqlclient.SqlDataReader
conn.Open()
objDR = Cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
While objDR.Read()
'userid.Text = objDR("userid")
surname1.Text = objDR("surname1")
firstname1.Text = objDR("fname1")
Title1 = objDR("title1")
End While
Page.DataBind()
End If