Help needed regarding autocomplete textbox in dot net 2.0
I am trying to create a textbox that provides autocomplete feature using a database table (SQL Express) as the source, in dot net 2.0 C#.
I am assigning the AutoCompleteCustomSource property of this textbox to the collection got from the data table at every TextChanged() event of the textbox.
It worked fine. But I get an exception "Attempted to read or write protected memory. This is often an indication that other memory is corrupt" sometimes when I type into the textbox
Alternatively, I tried to process the input text onlyif the user is idle for sometime say some 2 seconds while entering the text into the textbox,. For this, I used a System.Windows.Forms.Timer object, call its start() method at the textchanged event, set its interval to 1 second in the initialzation of the application and in the Tick event write the code to associate the AutoCompleteCustomSource property.
But here, the drop down box appears only for one second and disappers.
Your help would be appreciated.