• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 341
  • Last Modified:

SQLITE: What do I need after an INSERT statement?

I have an INSERT statement, followed by a SQLITE3_EXEC, followed by a SELECT statement and another SQLITE3_EXEC.  I'm getting an SQLERROR 21 (SQLITE_MISUSE) on the EXEC for the SELECT statement.

Line 11 (http://monobin.com/__d215dc84d) is giving me the error...

Am I missing something between the two EXECs?  like a COMMIT, or?
0
rmmarsh
Asked:
rmmarsh
  • 3
  • 3
1 Solution
 
gheistCommented:
line 9 should be changed from
L from CardData";

to
L from CardData;";
0
 
rmmarshAuthor Commented:
Sorry, that didn't fix anything... still getting the 21.
0
 
gheistCommented:
http://www.sqlite.org/c3ref/bind_blob.html

you need to bind some variable fields in prepared statement
select ... from ... where ?=... and ?= ,,,

etc
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
rmmarshAuthor Commented:
That particular SELECT statement is like "SELECT * FROM database"... I want all of the rows returned, although there will be only one...
0
 
gheistCommented:
SQLITE_MISUSE

    This error might occur if one or more of the SQLite API routines is used incorrectly. Examples of incorrect usage include calling sqlite_exec after the database has been closed using sqlite_close or calling sqlite_exec with the same database pointer simultaneously from two separate threads.
0
 
rmmarshAuthor Commented:
thank you for your time... I appreciate it...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now