How can vb6 code filter records?

Asked By 20 points N/A Posted on -
qa-featured

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.

SHARE
Answered By 0 points N/A #150995

How can vb6 code filter records?

qa-featured

Hello

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.

Regards.

Related Questions