Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15543

[SORT of SOLVED] Sqlite - Get Exact String in Sentence

$
0
0
Next issue...

Just trying to get the record (sentence) that contains the exact string.

When using LIKE '%string%' I will get all records that include partial matches.
Example.... "help" and "helpful"

But, if I just want to include records that use just "help" ('please help this old man') - <-- returned record

I have tried this... But get no records returned, but I know there are records because using LIKE '%help%' returns "help" and "helpful"

CODE - DOESN'T WORK
Code:

Dim da As New SQLiteDataAdapter("select * from main WHERE Scripture LIKE '%[" & txtSearch.Text & ",%' Or Scripture LIKE '%," & txtSearch.Text & ",%' Or Scripture LIKE '%," & txtSearch.Text & "]%'", connection)
Is there a better way to do this?

Viewing all articles
Browse latest Browse all 15543

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>