"Preston Zaugg" <[EMAIL PROTECTED]> wrote:
> I have some updates to the schema of my sqlite database that i am trying to 
> apply. When i run these statements from the command line util they run fine. 
> when i run them from the API I get a SQLITE_ERROR on the statement that 
> drops a table. These statements are selected out of an attached database and 
> executed against the default database.
> 
> The code runs the following statements:
> 1 drop views (send in all "drop view" statements at once)
> 2 drop table (statement text: "DROP TABLE Specific_Product;")
> 3 create new table and insert seed data (this step is repeated for multiple 
> tables)
> 4 create new view (repeated for multiple views)
> 
> step 2 returns a SQLITE_ERROR, but the other statements that don't rely on 
> the table being dropped run fine if i ignore the error.
> 

This is probably an SQLITE_SCHEMA error.  Rerun sqlite3_prepare() and
sqlite3_step() and it should work the second time.

This particular SQLITE_SCHEMA error seems unnecessary though.  Looks
like sqlite3_step() could probably do a better job of preventing it.
I'll have a look and see what I can find....
--
D. Richard Hipp <[EMAIL PROTECTED]>

Reply via email to