On Sat, Aug 27, 2011 at 9:52 PM, Simon Slavin wrote:
>
> On 27 Aug 2011, at 4:50pm, Abhinav Upadhyay wrote:
>
>> sqlite3_exec(db, "ATTACH DATABASE :memory AS metadb", NULL, NULL, &errmsg);
>
> Need a colon after 'memory':
>
> ATTACH DATABASE ':memory:' AS metadb;
>
> I don't think you need the quo
On 27 Aug 2011, at 4:50pm, Abhinav Upadhyay wrote:
> sqlite3_exec(db, "ATTACH DATABASE :memory AS metadb", NULL, NULL, &errmsg);
Need a colon after 'memory':
ATTACH DATABASE ':memory:' AS metadb;
I don't think you need the quotes I put in, I'm not sure.
When in doubt, use the SQLite shell too
Hi,
I am trying to attach an in-memory database and then create a table in
it. Here is the code that I am using:
/* I have already opened a connection to a database before the following */
sqlite3_exec(db, "ATTACH DATABASE :memory AS metadb", NULL, NULL, &errmsg);
if (errmsg != NULL) {
3 matches
Mail list logo