On Wed, Jan 23, 2013 at 2:36 PM, <roystonja...@comcast.net> wrote: > String Data = "INSERT INTO friend(name, address, age) > VALUES('John','Anywhere here','25')"; > > How would you actually pull the VALUES from variables and use them. A > complete example will be very helpful. >
Google for "sqlite3_bind example" and you'll find many examples. You'll also need to read up on "sqlite3_prepare()" and "sqlite3_prepare_v2()", both described in detail at: http://www.sqlite.org/c3ref/prepare.html In the _abstract_ it looks like: statement = prepare("INSERT INTO t(a,b,c) VALUES(?,?,?)"); bind( statement, 1, "foo" ); bind( statement, 2, "bar" ); bind( statement, 3, 32 ); And the above pages reveal the exact syntax/APIs to use. Note that the "String" class shown above is platform-specific and won't be understood by the C API - it uses (char const *) and (unsigned char const *). There are a number of C++ wrappers out there. AFAIK none of them are "official", but here's the one i currently use/maintain: http://fossil.wanderinghorse.net/wikis/cpdo/?page=cpdopp -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users