2009/4/17 jonwood <nab...@softcircuits.com>:
>
> Greetings,
>
> I'm getting an error compiling a parameter to a compiled statement.
> Unfortunately, since I'm using a customer wrapper class around sqlite,
> posting my code won't be much help. Here's what I'm doing:
>
> I create a compiled statement (two, actually).
>
> Then, each time through a loop, I bind an argument to the compiled
> statement, and then execute it.
>
> The first time through the loop, it works fine. But the second time through
> the loop, I get the following error when I attempt to bind the argument to
> the compiled statement.
>
> "Error binding integer parameter : library routine called out of sequence
> (error 21)"
>
> It may be something else wrong with my code but I just wanted to get a
> lucidity check on the approach I'm taking.
>
> Thanks.
> --

Is sqlite3_reset() being called before looping around?

viz:

sqlite3_prepare_v2()
while( moreWork )
{
    int status = SQLITE_ROW;
    sqlite3_bind_xxx()
    while( SQLITE_ROW == status )
    {
        status = sqlite3_step()
        processRowData()
    }
    sqlite3_reset()
}

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

Reply via email to