Help with SQLite Prepared Statements
Posted: Thu Jan 08, 2026 8:16 pm
Hi,
I recently ventured into this area while trying to optimize some code. I have had success using prepared statements with SELECT queries and For row In stmt:rows(sql$). I haven't been able, however to use them with an INSERT or UPDATE action query. I tried stmt:exec() and get an error and stmt:Step() and the error says "expecting a variable". Any help would be appreciated. Thanks.
NathanH
I recently ventured into this area while trying to optimize some code. I have had success using prepared statements with SELECT queries and For row In stmt:rows(sql$). I haven't been able, however to use them with an INSERT or UPDATE action query. I tried stmt:exec() and get an error and stmt:Step() and the error says "expecting a variable". Any help would be appreciated. Thanks.
NathanH