I'm trying to build a search query to match whole words in SQLite and C# on Windows. When I run a query like this:
SELECT a, b FROM Events WHERE c REGEXP @SearchString;
Then:
cmd.Parameters.Add(new SQLiteParameter("@SearchString",
"%[^a-zA-Z0-9]" + searchdata.SearchText + "[^a-zA-Z0-9]%"));
And when I call:
var r = cmd.ExecuteReader();
I get REGEXP no such function. I wonder how to activate REGEXP support and CASE SENSITIVE search.
SQLite is written in ANSI-C. The C programming language is used because it is the universal assembly language - it can run on just about any hardware and on just about any operating system. No matter what programming language is used for the application code, it can usually interface easily with a library written in C.
SQLite is a opensource SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation.
What Is SQLite? SQLite is a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine. SQLite is the most used database engine in the world.
SQLite is generally a lot faster than MS SQL Server if dealing with small-size databases. SQLite can be integrated with different programming languages and environments including . NET.
I've got it! The problem was that I didn't define the REGEXP function. I've got from here: here a definition for C#.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With