On Sat, Aug 27, 2011 at 9:52 PM, Simon Slavin <[email protected]> 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 quotes I put in, I'm not sure.
>
> When in doubt, use the SQLite shell tool to execute the commands you're 
> trying to do in your app.  This will tell you whether the fault is in your 
> SQL coding or your C coding.  It has saved me many hours of looking at the 
> wrong problem.

Ah, that was silly of me :( . I could not see the 2nd colon in the
documentation page until now :P. Looks like it is working.

Thanks

--
Abhinav
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to