Open
Description
hi,
i was trying to execute INSERT and DELETE in a single command, but i couldn't do it using Sqlite3pp.
sample code:
query = "INSERT INTO Logs (logData) VALUES(?);"
"DELETE FROM Logs WHERE sequenceId=(SELECT MIN(sequenceId) FROM Logs)";
sqlite3pp::command cmd(clinicalDb_, query.c_str());
cmd.bind(1, (void *)&info, sizeof(info), sqlite3pp::copy);
if ((rc = cmd.execute_all()) != NO_SQL_ERROR)
{
PX_ERRORF("Command Execution failed. rc = {}", rc);
}
in this case i am getting rc value 1(SQLITE_ERROR).
if i pass some string to VALUES("some string), query executes successfully.
Please help me how to solve this.
Metadata
Metadata
Assignees
Labels
No labels