Improve Barcode search in a Textbox C#

Solo761

New Member
In a WinForm C# application I have a Barcode_textbox. In \[code\]TextChanged\[/code\] event I have an SQL query to check for the TextBox.Text value in the database which is the barcode. The problem is that for each entered digit the SQL Query will be fired, so if a barcode of length 13 it will make 13 check in the database and it is being extremely SLOW.So, what is the TextBox event that is fired only when the user stops writing in the TextBox (or the barcode reader stpos reading), or what is the optimal solution for checking for a barcode in the database. Note that bacode is of different length
 
Top