Thanks Dan and Igor for clarifying the 5th param.
I'm guessing it's safe to leave it at 0 if I
just use one SQL statement then.

Funny you should mention the capital at the start
to make "Hexion". I thought of that just after I
posted. But it doesn't solve the problem unfortunately.
Zero results are still returned.

Oh one other quick question: Any way to get the number
of rows/columns after preperation without using
ssomething like sqlite3_get_table?

Dan



On Sat, 14 Jun 2008 05:23:00 +0100, Dan <[EMAIL PROTECTED]> wrote:

> On Jun 14, 2008, at 10:39 AM, Daniel White wrote:
>
>> Hi guys,
>>
>> My first post to this list, and I'm new to SQL in general too.
>>
>> Just a couple of questions to start:
>>
>> ***1:
>> In the sqlite3_prepare_v2 function, can someone explain
>> to me the 5th parameter better than the site's help can?
>>
>> I quote:
>> /* OUT: Pointer to unused portion of zSql */
>>
>> I'm a bit perplexed. zSql is just the SQL query string.
>> There isn't an unused portion really, and even if there
>> was, I can't imagine how it could be of use. I just want
>> SQlite to process the string up to the NULL terminator.
>>
>> I tend to use 0. eg:
>> sqlite3_prepare_v2(database,sqlstring,-1,&ppStmt,0);
>>
>> It seems to 'work'. However, I'm still curious as to what
>> that 5th parameter really does, or why you really need it.
>
> For when you have a string containing more than one SQL statement.
> i.e.
>
>    "INSERT INTO songs VALUES(...) ; INSERT INTO songs VALUES(...) ; ..."
>
> If this string is passed to sqlite3_prepare_v2, the unused portion
> begins right after the first semi-colon.
>
>> ***2:
>> When I use the SQL query string:
>> "SELECT * FROM songs WHERE SongTitle like 'hexion'"
>>
>
> The song title is actually 'Hexion'. By default LIKE is case-
> insensitive,
> = is not.
>
> Dan.
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



-- 
www.skytopia.com
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to