databases in vb 2008

Microsoft Windows xp professional w/serv...
July 16, 2010 at 08:44:19
Specs: Windows XP, 512mb
hey this is my sec question about same project but i am so much muddled please help. this is about search statement in vb 2008. i have made entries in tables now i want to search for records based on roll no and then display using textboxes this is the code i used which showed error again on executenonquery statement
Dim STR As String
Dim SCON As SqlConnection
Dim SDr As SqlDataReader
Dim DS As DataSet
Dim rn As String
' STR = InputBox("ENTER ROLL NO.")
'SCON = New SqlConnection("Data Source=KJ\SQLEXPRESS;Initial Catalog=GNONE;Integrated Security=True;Pooling=False")
'SCON.Open()
'cm = New SqlCommand("SELECT * FROM STUINFO WHERE ROLLNO =@RN", SCON)
'sdr = cm.ExecuteReader
'cm.Parameters.Add(New SqlParameter("rn", SqlDbType.VarChar, 10))
'If SDr.Read Then
'TXTSTUNAME.Text = SDr(0)
'TXTSTUROLL.Text = SDr(1)

'End If

thank you


See More: databases in vb 2008

Report •


#1
July 18, 2010 at 04:06:12
First glance: Everything is commented out.

Second glance: You call ExecuteReader() before defining @RN.

What error are you getting?


Report •
Related Solutions


Ask Question