I have a database with two columns: 1)Word 2) Times Used
When the user enters a word it find the combination of words already typed (ex: combo = hello world) and updates the database using a dataset
The query is as follows:
SELECT TimesUsed, Word FROM Predictions WHERE (Word LIKE @partialWord) ORDER BY TimesUsed DESC
In my application I am calling it as follows:
PredTable = PredTA.GetDataByPartialWord(combo)
If PredTable.Count > 1 Then MsgBox("problem")
If PredTable.Count = 1 Then PredTA.Update(PredTable(0).TimesUsed + 1, combo)
If PredTable.Count = 0 Then PredTA.Insert(combo, 1)
When I debug it is taking 0.15 seconds to just do this query Is there anyway that I can quicken this up?
Aucun commentaire:
Enregistrer un commentaire