>This looks like a simple const violation; a string literal has type
>"array of n const char", but you attempt to point a non-const char* into
>it.

Yes, I've changed const *sql to const char* sql = "insert into xxx
values(?,?);

>You probably want to look at bind variables (sqlite3_bind_text) though,
>to address the bigger issue (getting SQLite to read data from C++
>variables).I'm now running:

sqlite3_prepare(...)
sqlite3_bind_text (stmt, 1, name);
sqlite3_bind_int(stmt, 2, age);

sqlite3_step(stmt);
sqlite3_finalize(stmt);




>(You appear to be writing something closer to C than idiomatic C++,

Yes, you are correct.  Most of the code I'm following is straight C.  I've
added C++ but don't want to muck with much until I get the code working.

I don't have it working yet but I feel I'm getting closer.  Your response
indicates I'm heading in the right direction!
Thanks!

Nick.

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------




-- 
View this message in context: 
http://www.nabble.com/Passing-Arguments-to-SQLite3-from-C%2B%2B-tf3548345.html#a9906160
Sent from the SQLite mailing list archive at Nabble.com.


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to