Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-27 Thread GB
Clyde Eisenbeis schrieb am 27.01.2017 um 18:51: I tried this: - System.Data.SQLite.SQLiteCommand sqliteCmd = sqliteConnection.CreateCommand()); sqliteCmd.CommandText = "SELECT" + stFieldNames + "FROM " + stTableName + " WHERE " + stLikeFieldName + " LIKE '%'

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-27 Thread Clyde Eisenbeis
I agree completely! I am grateful that SQLite exists. It would be good if users could post solutions, similar to forums. This relieves the burden on the benefactors ... and would, quite likely, attract more users. On Fri, Jan 27, 2017 at 2:38 PM, Warren Young wrote: > On

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-27 Thread Warren Young
On Jan 27, 2017, at 1:09 PM, Clyde Eisenbeis wrote: > > The SQLite websites would be more useful with examples. Certainly. No question. The thing is, I think most of us are primarily grateful that SQLite *exists* and that it works as well as it does. Given a choice of

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-27 Thread Clyde Eisenbeis
Hi Simon Slavin, This works! Almost identical to the approach used for OLE DB example described in the 26 Jan, 11:45am email attachment. The end result code for SQLite is attached. - Hi James K. Lowden, Examples are a source I've used since 1968 (Fortran using key

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-27 Thread James K. Lowden
On Thu, 26 Jan 2017 11:45:41 -0600 Clyde Eisenbeis wrote: > Usually I look at examples, and extract the relevant info. In the Age of Google, that has become a popular technique. But it's not a good way to learn anything. I wonder, though: how do you know what the "relevant

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-27 Thread Simon Slavin
On 27 Jan 2017, at 5:59pm, Clyde Eisenbeis wrote: > sqliteCmd.CommandText = SELECT fstPriority, fstInfo, fstDateCreated, > fstDateModified, fiKeyID FROM MemoPadTable WHERE fstInfo LIKE '%' || > ?1 || '%'" > > liststLikeFieldValue[0] = "bruce" Please try the following:

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-27 Thread Clyde Eisenbeis
sqliteCmd.CommandText = SELECT fstPriority, fstInfo, fstDateCreated, fstDateModified, fiKeyID FROM MemoPadTable WHERE fstInfo LIKE '%' || ?1 || '%'" liststLikeFieldValue[0] = "bruce" On Fri, Jan 27, 2017 at 11:55 AM, Simon Slavin wrote: > > On 27 Jan 2017, at 5:51pm,

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-27 Thread Simon Slavin
On 27 Jan 2017, at 5:51pm, Clyde Eisenbeis wrote: > System.Data.SQLite.SQLiteCommand sqliteCmd = > sqliteConnection.CreateCommand()); > > sqliteCmd.CommandText = "SELECT" + stFieldNames + "FROM " + > stTableName + " WHERE " + stLikeFieldName + " LIKE '%' || ?1 || '%'"; > >

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-27 Thread Clyde Eisenbeis
Thanks. Was able to open the .chm file. I tried this: - System.Data.SQLite.SQLiteCommand sqliteCmd = sqliteConnection.CreateCommand()); sqliteCmd.CommandText = "SELECT" + stFieldNames + "FROM " + stTableName + " WHERE " + stLikeFieldName + " LIKE '%' || ?1 ||

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread GB
Clyde Eisenbeis schrieb am 26.01.2017 um 18:45: It appears that sqlite3 is not part of System.Data.SQLite. Aaah! Now we get somewhere! You should have told us from the beginning that you are using SQLite through the .NET/MONO Wrapper. All the mentioning of sqlite3_bind_* and the like refer to

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread Joe Mistachkin
Clyde Eisenbeis wrote: > > I can't read CHM docs. > I'm somewhat curious about that. Anyhow, there are alternatives: 1. IntelliSense in the Visual Studio IDE (this requires the XML file "System.Data.SQLite.xml", which should have been included with your DLL).

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread Clyde Eisenbeis
I can't read CHM docs. I'd appreciate some example code which uses "sqlite3_bind_". Thanks! On Thu, Jan 26, 2017 at 12:02 PM, Joe Mistachkin wrote: > > Clyde Eisenbeis wrote: >> >> It appears that sqlite3 is not part of System.Data.SQLite. >> > > Actually, it is.

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread Joe Mistachkin
Clyde Eisenbeis wrote: > > It appears that sqlite3 is not part of System.Data.SQLite. > Actually, it is. However, the managed components provide a "wrapper" around the core library functionality. The documentation, in Windows CHM format, is available here: https://urn.to/r/sds_docs

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread Clyde Eisenbeis
Usually I look at examples, and extract the relevant info. After I have extracted relevant info, I create functions that are universally valid for different programs ... see attachment for one example. In this case, I have attempted to create code using what has been described so far. However,

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread R Smith
On 2017/01/26 5:46 PM, Clyde Eisenbeis wrote: To answer a previous question, here is an example of stCmdString contents: stCmdString = "SELECT fstPriority, fstInfo, fiKeyID FROM PadTable WHERE fstInfo LIKE '%macro%'" This works. Yes, and so it should, but this is what you think it

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread Warren Young
On Jan 26, 2017, at 8:40 AM, Clyde Eisenbeis wrote: > > When I tried entering: > > sqlite3_bind_ > > the compiler starts complaining. What I wrote was "sqlite3_bind_*()” which you were expected to understand as a reference to the 15 functions beginning with “sqlite3_bind_”

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread Simon Slavin
On 26 Jan 2017, at 3:04pm, Clyde Eisenbeis wrote: > string stCmdString = "SELECT" + stFieldNames + "FROM " + stTableName > + " WHERE " + stLikeFieldName + " LIKE ('%' || " + > liststLikeFieldValue[0] + " || '%')"; Still looks like there would be spaces missing from that.

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread Andy Ling
Now you know a bit more about what you are looking for, perhaps you should revisit the links Warren Young gave a few days ago... >> You’re looking for prepared statements with parameters: >>https://sqlite.org/c3ref/stmt.html >>https://sqlite.org/lang_expr.html#varparam Regards Andy

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread Clyde Eisenbeis
To answer a previous question, here is an example of stCmdString contents: stCmdString = "SELECT fstPriority, fstInfo, fiKeyID FROM PadTable WHERE fstInfo LIKE '%macro%'" This works. On Thu, Jan 26, 2017 at 9:40 AM, Clyde Eisenbeis wrote: > Not finding much. > > I will

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread Clyde Eisenbeis
Not finding much. I will try searching for a single word: string stCmdString = "SELECT" + stFieldNames + "FROM " + stTableName + " WHERE " + stLikeFieldName + " LIKE ('%' || ?1 || '%') "; When I tried entering: sqlite3_bind_ the compiler starts complaining. On Thu, Jan 26, 2017 at 9:18

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread Clyde Eisenbeis
I'm searching the internet for sqlite3_bind_* () examples. On Thu, Jan 26, 2017 at 9:14 AM, Andy Ling wrote: > I think the point is, you need to use a prepared statement and bind the > parameters to it. > The bind process handles the special characters. > > So you will need

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread Andy Ling
I think the point is, you need to use a prepared statement and bind the parameters to it. The bind process handles the special characters. So you will need to create a command string with question mark operators in like stCmdString += " AND fstInfo LIKE ('%' || ?1 || '%') AND fstInfo LIKE

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread Clyde Eisenbeis
Re-reading the previous emails, it appears I also need to use sqlite3_bind_*(). On Thu, Jan 26, 2017 at 9:04 AM, Clyde Eisenbeis wrote: > I've also tried: > > string stCmdString = "SELECT" + stFieldNames + "FROM " + stTableName > + " WHERE " + stLikeFieldName + " LIKE ('%' ||

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread R Smith
On 2017/01/26 5:04 PM, Clyde Eisenbeis wrote: I've also tried: string stCmdString = "SELECT" + stFieldNames + "FROM " + stTableName + " WHERE " + stLikeFieldName + " LIKE ('%' || " + liststLikeFieldValue[0] + " || '%')"; which does not work. Could you kindly simply output the resulting

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread Clyde Eisenbeis
I've also tried: string stCmdString = "SELECT" + stFieldNames + "FROM " + stTableName + " WHERE " + stLikeFieldName + " LIKE ('%' || " + liststLikeFieldValue[0] + " || '%')"; which does not work. On Thu, Jan 26, 2017 at 8:14 AM, heribert wrote: > There are some

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread heribert
There are some missing spaces i think: string stCmdString = "SELECT " + stFieldNames + " FROM " + stTableName + " WHERE " + stLikeFieldName + " LIKE '%'||" + liststLikeFieldValue[0] + "||'%'"; Am 26.01.17 um 15:04 schrieb Clyde Eisenbeis: I tried replacing this: string stCmdString =

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread heribert
There are some missing spaces i think: string stCmdString = "SELECT " + stFieldNames + " FROM " + stTableName + " WHERE " + stLikeFieldName + " LIKE '%'||" + liststLikeFieldValue[0] + "||'%'"; Am 26.01.17 um 15:04 schrieb Clyde Eisenbeis: I tried replacing this: string stCmdString =

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-26 Thread Clyde Eisenbeis
I tried replacing this: string stCmdString = "SELECT" + stFieldNames + "FROM " + stTableName + " WHERE " + stLikeFieldName + " LIKE '%" + liststLikeFieldValue[0] + "%'"; with this: string stCmdString = "SELECT" + stFieldNames + "FROM " + stTableName + " WHERE " + stLikeFieldName + " LIKE

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-25 Thread Richard Hipp
On 1/25/17, Warren Young wrote: > > stCmdString += " AND ‘%?1%’ LIKE ‘%?2%’”; > > Then use the sqlite3_bind_*() calls to insert parameters 1 and 2 into the > string. Not quite. You cannot have parameters embedded in the middle of strings. The whole string is replaced by a

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-25 Thread Warren Young
On Jan 25, 2017, at 8:50 AM, Clyde Eisenbeis wrote: > > Are there code examples similar to the following (OLE DB)? Code examples? Maybe, but the second link I gave you is pretty clear. The bits you want are even in bold text. > stCmdString += " AND " + stLikeFieldName + "

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-25 Thread Clyde Eisenbeis
I should clarify ... I am currently using: string stCmdString = "SELECT" + stFieldNames + "FROM " + stTableName + " WHERE " + stLikeFieldName + " LIKE '%" + liststLikeFieldValue[0] + "%'"; for (int iii = 1; iii < liststLikeFieldValue.Count; iii++) stCmdString += " AND " +

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-25 Thread Clyde Eisenbeis
Thanks for the prompt response! Are there code examples similar to the following (OLE DB)? oledbCmd.CommandText = "SELECT" + stFieldNames + "FROM " + stTableName + " WHERE " + stLikeFieldName + " LIKE @p0"; for (int iii = 1; iii < liststLikeFieldValue.Count; iii++)

Re: [sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-25 Thread Warren Young
On Jan 25, 2017, at 8:33 AM, Clyde Eisenbeis wrote: > > The use of .Parameters in OLE DB fixes this problem. Is there an > equivalent for SQLite? You’re looking for prepared statements with parameters: https://sqlite.org/c3ref/stmt.html

[sqlite] Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters?

2017-01-25 Thread Clyde Eisenbeis
Using SQLite, how can I search for chars that include a ', similar to OLE DB .Parameters? This works to find bruce and baseball: string stCmdString = "SELECT fstInfo FROM PadTable WHERE fstInfo LIKE '%bruce%' AND fstInfo LIKE '%baseball%'" Not sure how to find bruce's and baseball. I know