On 2 Mar 2010, at 7:45pm, Adam DeVita wrote:
> If you look in http://www.sqlite.org/capi3ref.html#sqlite3_bind_blob
> for the function
>
> int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*));
>
> This will allow you to bind any character into an SQL statement.
> There
Good day,
If you look in http://www.sqlite.org/capi3ref.html#sqlite3_bind_blob
for the function
int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*));
This will allow you to bind any character into an SQL statement.
There are other benefits to using this technique.
Simon and Gabriel,
I'm using the C API, I'm inserting strings. One of the strings happens to
have an "'" in it. I have to write extra code to parse the character and
escape it, I'll do that if I have to. I have not tried the command line
tool. I'll try it and get back to you.
Kavita
On 3/2/10
You should be using prepared statements. If that's not possible, then
escape the "'", for example:
INSERT INTO "this" VALUES ('Rootuser''s Desktop')
On Tue, 2010-03-02 at 12:51 -0600, Kavita Raghunathan wrote:
> I notice that when I try to insert the character “’” as part of a string
On 2 Mar 2010, at 6:51pm, Kavita Raghunathan wrote:
> I notice that when I try to insert the character “’” as part of a string into
> the sqlite database, my updates don’t work. Any ideas why? The same string
> without the “’” character works. I have not debugged to see where exactly in
>
I notice that when I try to insert the character “’” as part of a string into
the sqlite database, my updates don’t work. Any ideas why? The same string
without the “’” character works. I have not debugged to see where exactly in
sqlite it fails.
I’m inserting a text like this: “Rootuser’s
6 matches
Mail list logo