Hello
I have the following code
Using conn As New SqlConnection(ConfigurationManager.ConnectionStrings("AnalyticalNewConnectionString").ConnectionString)
conn.Open()
Using cmd As SqlCommand = conn.CreateCommand
cmd.CommandText = "select Sample_ID, PO_Number from New_analysis_data where RFA_number =" & RFA_number_box.Text
Dim sqlrd As SqlDataReader = cmd.ExecuteReader()
While sqlrd.Read()
Me.sample_ID.Text = "Sample_ID"
Me.purchase_order.Text = "PO_Number"
End While
End Using
End UsingIt basically should read a database (sql server 2008) and then return the two fields into 2 textboxes based on a variable I enter. It occurs on a button click.
All I get though it the words sample_id and PO_Number in the textboxes. Help!