Improve Barcode search in a Textbox C#

前端 未结 5 1034
死守一世寂寞
死守一世寂寞 2021-01-23 21:27

In a WinForm C# application I have a Barcode_textbox. In TextChanged event I have an SQL query to check for the TextBox.Text value in the database which is the barc

5条回答
  •  北恋
    北恋 (楼主)
    2021-01-23 22:07

    Use timer in this fashion that when user stops typing in your textbox for a given small time say 1 second only then get data from database...

    Also you can place a check at the characters typed by user with a counter such that when it exceeds that minimum(the minimum size that your key can be) get the data...Will save much time

提交回复
热议问题