N/APosted on - 01/15/2013
Hello experts. I’m using VB6 and MySQL in my project. I would like to know what function I should use in VB6 to filter specific records from a database. For example, when a user type in the search box ‘A’, all the row of a specific field that starts with letter ‘A’ will be available to user. How can I do that? Please explain it to me clearly on how can vb6 code filter records.
How can vb6 code filter records?
I will provide you pseudo code which you can implement into your VB6 project.
Let's assume you have one textbox and a button, you type something in your textbox and after pressing button that code executes itself. So in onPressed event inside your button you should open your database and make query something like this: "SELECT first_name FROM database_name where first_name LIKE " + textBox.text + " '%' ";
Now when you retrieved your data you should only display it somewhere, perhaps in your table.