On Fri, 08 May 2015 14:49:54 -0700, Scott Doctor
wrote:
> Can I prepare multiple statements then implement them in
> arbitrary order (based on some logic)?
Yes.
> Or do the statements need to be prepared, stepped, finalized
> serially?
No. You even don't have to _finalize() the statement, yo
On 8 May 2015, at 11:40pm, Scott Doctor wrote:
> So if I have a loop that finds a row with some data (statement1)
> then based on values from that row sets fields in other rows
> statement2 find a row to set new data
> statement3 set column to something,
> repeat n times.
> then go back and do i
On 5/8/15, Scott Doctor wrote:
>
> Can I prepare multiple statements then implement them in
> arbitrary order (based on some logic)?
>
> Or do the statements need to be prepared, stepped, finalized
> serially?
>
They can be run in any arbitrary order. That is the usual case, actually.
--
D. Ric
So if I have a loop that finds a row with some data (statement1)
then based on values from that row sets fields in other rows
statement2 find a row to set new data
statement3 set column to something,
repeat n times.
then go back and do it all again x times.
I can prepare the 3 statements first the
Can I prepare multiple statements then implement them in
arbitrary order (based on some logic)?
Or do the statements need to be prepared, stepped, finalized
serially?
Scott Doctor
scott at scottdoctor.com
--
Yup, my bad. Fixed.
On 16/10/2010 12:03 AM, Andrew Davison wrote:
> On 15/10/2010 11:49 PM, Pavel Ivanov wrote:
>>> Now I decide that I want a second type of insert, so I try to use a
>>> prepared statement for that as well. However it always fails. As long as
>>> the other prepared statement is h
On 15/10/2010 11:49 PM, Pavel Ivanov wrote:
>> Now I decide that I want a second type of insert, so I try to use a
>> prepared statement for that as well. However it always fails. As long as
>> the other prepared statement is hanging round I can't prepare a new one.
>> Does this seem right or am I
> Now I decide that I want a second type of insert, so I try to use a
> prepared statement for that as well. However it always fails. As long as
> the other prepared statement is hanging round I can't prepare a new one.
> Does this seem right or am I really soing something wrong?
You are doing som
On Fri, Oct 15, 2010 at 8:43 AM, Andrew Davison
wrote:
> In my database I do lots of inserts, of exactly the same nature so I use
> a prepared statement, which I cache, always reseting after use. Works fine.
>
> Now I decide that I want a second type of insert, so I try to use a
> prepared stateme
In my database I do lots of inserts, of exactly the same nature so I use
a prepared statement, which I cache, always reseting after use. Works fine.
Now I decide that I want a second type of insert, so I try to use a
prepared statement for that as well. However it always fails. As long as
the o
*argh*
more or less my bad, sqlite3_prepare_v2() instead of sqlite3_prepare()
solved it.
Oyvind.
On Wed, Nov 26, 2008 at 5:29 PM, Igor Tandetnik <[EMAIL PROTECTED]> wrote:
> Oyvind Idland <[EMAIL PROTECTED]>
> wrote:
> > I am using two prepared statements in my code (that does INSERT),
> > fo
Oyvind Idland <[EMAIL PROTECTED]>
wrote:
> I am using two prepared statements in my code (that does INSERT),
> following the pattern
>
> prepare(stmt1)
> prepare(stmt2)
>
> while (xx)
> {
> bind(stmt1)
> step(stmt1)
> reset(stmt1)
>
> bind(stmt2)
> step(stmt2)
> reset(stmt2)
> }
>
> The fir
Hi,
according to documentation,
"An application is allows to prepare multiple SQL statements in advance and
evaluate them as needed. There is no arbitrary
limit to the number of outstanding prepared statements."
I am using two prepared statements in my code (that does INSERT), following
the patt
On 12/21/06, E Tse <[EMAIL PROTECTED]> wrote:
Hi guys,
I ran into a strange problem. I have 2 prepared sqlite3_stmt, each inserting
to different tables in a sqlite database:
sqlite3_stmt* insertA;
std::string sql = "insert into tablea(col1) values(?)";
int rc = sqlite3_prepare(db_, sql.c_str(),
Hi guys,
I ran into a strange problem. I have 2 prepared sqlite3_stmt, each inserting
to different tables in a sqlite database:
sqlite3_stmt* insertA;
std::string sql = "insert into tablea(col1) values(?)";
int rc = sqlite3_prepare(db_, sql.c_str(), sql.size(), &insertA, NULL);
sqlite3_stmt* ins
Hello,
I'm using two prepared statements in a block of cross platform C++ code
like this (very roughly):
{
sqlite3_stmt * pstmt1 = NULL;
sqlite3_stmt * pstmt2 = NULL;
pstmt1 = PrepareAndBind(...); // Prepare and bind one statement
pstmt2 = PrepareAndBind(...); // Prepare and
16 matches
Mail list logo