cmd.Connection = con
cmd.CommandText = "SELECT * FROM students_info WHERE id = '" & txtSearch.Text & "' "
adapter.SelectCommand = cmd
data.Clear()
adapter.Fill(data, "list")
txtfname.DataBindings.Add(" Text ", data, " List.Fname ")
txtfname.DataBindings.Clear()
Asked
Active
Viewed 25 times
-2
GSerg
- 73,524
- 17
- 153
- 317
-
2(Not considering how the query is performed) why are you clearing the DataBindings right after you have added one? What are those spaces in the Property/Column names? Do you really have spaces there? What is `List.Fname`? Is that the actual name of a Column? – Jimi Jun 02 '22 at 14:25
-
`students_info`, [eh](https://stackoverflow.com/q/332365/11683). – GSerg Jun 02 '22 at 14:26