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 '%'
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
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
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
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
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:
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,
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 || '%'";
>
>
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 ||
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
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).
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.
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
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,
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
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_”
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.
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
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
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
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
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-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 ('%' ||
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
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
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 =
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 =
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
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
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 + "
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 " +
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++)
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
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
34 matches
Mail list logo