A aru Member Mar 10, 2010 #1 when iam searching a table field in my database with a text box i want to Show Result in a ListBox Iused Some Methods But It is Not Success any one can help me? :sign0085:
when iam searching a table field in my database with a text box i want to Show Result in a ListBox Iused Some Methods But It is Not Success any one can help me? :sign0085:
klaus Expert Licensed User Longtime User Mar 10, 2010 #2 Sorry, but I don't understand exactly what you want to do. What kind of data do you enter into the Textbox and what result should be displayed in the ListBox. Best regards.
Sorry, but I don't understand exactly what you want to do. What kind of data do you enter into the Textbox and what result should be displayed in the ListBox. Best regards.
A aru Member Mar 11, 2010 #3 Ihave Many Fields Like Student name,address,phone,mobile etc when iam search the student name via a textbox i want to display the search result in the listbox can you help me?
Ihave Many Fields Like Student name,address,phone,mobile etc when iam search the student name via a textbox i want to display the search result in the listbox can you help me?
klaus Expert Licensed User Longtime User Mar 11, 2010 #4 You find attached a small program showing a solution. Best regards. Attachments ListBox.sbp 1.2 KB · Views: 225
A aru Member Mar 11, 2010 #5 Ya I Downloaded The Progaram But it is not cleared my dout this is my code Command.AddParameter("STUDENT") Command.SetParameter("STUDENT",STUDENT.Text) Reader.New1 Command.CommandText = "select * from studentinfo where studentname=@STUDENT" Connection.BeginTransaction Reader.Value = Command.ExecuteReader Do While Reader.ReadNextRow = True 'ListboxView1.Add(Reader.GetValue(1)) Loop Reader.Close Connection.EndTransaction this is My concept is this possible 'ListboxView1.Add(Reader.GetValue(1)) I thing Now You Can Help Me :sign0085:
Ya I Downloaded The Progaram But it is not cleared my dout this is my code Command.AddParameter("STUDENT") Command.SetParameter("STUDENT",STUDENT.Text) Reader.New1 Command.CommandText = "select * from studentinfo where studentname=@STUDENT" Connection.BeginTransaction Reader.Value = Command.ExecuteReader Do While Reader.ReadNextRow = True 'ListboxView1.Add(Reader.GetValue(1)) Loop Reader.Close Connection.EndTransaction this is My concept is this possible 'ListboxView1.Add(Reader.GetValue(1)) I thing Now You Can Help Me :sign0085:
klaus Expert Licensed User Longtime User Mar 11, 2010 #6 You should use: ListboxView1.Clear For i=0 to Reader.FieldCount-1 ListboxView1.Add(Reader.GetValue(i)) Next Best regards.
You should use: ListboxView1.Clear For i=0 to Reader.FieldCount-1 ListboxView1.Add(Reader.GetValue(i)) Next Best regards.