On 12-02-01 04:32 AM, Marcus Grimm wrote:

On 01.02.2012 09:32, Guy Terreault wrote:
On 12-02-01 03:03 AM, Larry Brasfield wrote:

I cannot answer why Simon does not write demo code at every opportunity, but I think I speak for more than just myself by revealing that I have other work, and a life, and consider time a scarce resource.

Thanks Larry for taking some of your precious time to not just answer the question.
And I have read shell.c and it is giberish to me.

I would write the code myself if I new it. I guess I will have to wait until someone has more time to answer properly.

What we don't understand is why one can use sqlite without knowing
the rather basic operation like executing an sql command...
Anyway, if you look again at
http://www.sqlite.org/quickstart.html
you may extract something like:

int main(int argc, char **argv)
{
    sqlite3 *db;

    if( sqlite3_open("mysqlite.db", &db) )
    {
       sqlite3_exec(db, "PRAGMA journal_mode = WAL;", NULL, 0, 0);
       sqlite3_close(db);
    }
    return(0);
}

pretty easy, isn't it ?

hth
Marcus

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


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


Thanks Marcus
this is what should have been done as an answer to the initial question.

My interventions was to point out that this mailing list is read by everybody and yes some are new to sqlite and some are also new to c code. and it is sometimes difficult to distinguish the two.

sqlite3_exec and all the other function you use in your example are from the sqlite API and yes consulting it is a good thing. And now with your example we will all be interested to consult it to understand what all the parameters do.

If I look at this http://www.sqlite.org/c3ref/funclist.html they are so many functions. finding the one a new guy needs is scary. And http://www.sqlite.org/c3ref/exec.html does explain all, but your example does it in 3 or 4 lines.

And we all thank your simple example that we can build on it.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to