Thanks, that solved the issue, of course if I had checked the error message
I would have solved it myself :(

Mike

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 05 December 2007 16:27
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Is this a valid use of attach?

"Mike Marshall" <[EMAIL PROTECTED]> wrote:
> Possibly a stupid question but I'm trying to do an attach and then query
via
> a single sqlite3_exec() statement.
> 
>  
> 
> Is the following a valid use?

It is if the name of your database file is literally "dbpath".
But from context, I suspect you are thinking that dbpath is
some kind of variable that holds the database file name.  That
is incorrect.  Substitute the name of your file (appropriately
quoted) in place of where you have written "dbpath".

> 
>  
> 
> sqlite3_exec(pDB,"ATTACH dbpath as universe;select * from othertable where
> identifier IN (select identifier from
> universe.identifierlist)",cbfn,NULL,NULL);
> 
>  
> 
> Thanks in advance
> 
>  
> 
> Mike



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



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

Reply via email to