Just a quick note: this approach is vulnerable to injection attacks if you’re not sanitising txt_Find.Text (which it looks like you’re not). EG, someone could search for the text
which could delete your table MYTAB.
Have a look at Prepared Statements, which will avoid this.
[quote=171112:@Stefano Riva]querysql = “SELECT * FROM MYTAB WHERE (”
querysql = querysql + “MYTAB.NAME”+" LIKE %" + txt_Find.Text + “%)”[/quote]
Try
[code]Dim ps As mySQLPreparedStatement
Dim rs As RecoedSet
Dim strSearch As String = “%” + Find.Text + “%”
ps = DatabaseObject.Prepare(“SELECT * FROM MYTAB WHERE (? LIKE ?)”)