Thanks Igor for the info.
I have tried to prepare and execute each one seperately but it didn't work.
Thanks,
JP



----- Original Message ----
From: Igor Tandetnik <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Wednesday, April 9, 2008 8:25:05 PM
Subject: Re: [sqlite] sqlite3_prepare_v2(pDb, stmt, -1, &pReadStmt, 0) for read 
the table

"Joanne Pham" <[EMAIL PROTECTED]>
wrote in message news:[EMAIL PROTECTED]
> I used sqlite3_prepare_v2(pDb,stmt,-1,&pReadStmt,0)
> for preparing the statement and used sqlite3_step(pReadStmt); to get
> each row.
> my stmt is :
>    select remoteId, bytesIn from compressTable
> then it worked ok
>
> but if my statement has the attach database then it didn't work
>  because the sqlite3_prepare_v2 has problem. attach database
> 'CommonDB' as CDB;  select remoteId, bytesIn from compressTable where
> remoteId in (select remoteId from CDB.remoteWXTable where
> remoteType=1); detach database CDB;

That's three statements, not one. You need to prepare and execute each 
one separately.

Igor Tandetnik



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to