Home > Blockchain >  sqlite3 and boost asio ssl server sqlite3_prepare_v2 error
sqlite3 and boost asio ssl server sqlite3_prepare_v2 error

Time:01-08

I use the boost asio ssl server from this enter image description here

  • when test.db is incorrectly created e.g.:

    PRAGMA foreign_keys=OFF;
    BEGIN TRANSACTION;
    CREATE TABLE table1(oops int);
    COMMIT;
    
    client: 127.0.0.1
    connection ok
    sqlite3_prepare_v2 returns an error => 1
    parameter count statement = 0
    

    enter image description here

  • when the file test.db doesn't exist at all, the output is the same:

    client: 127.0.0.1
    connection ok
    sqlite3_prepare_v2 returns an error => 1
    parameter count statement = 0
    

    enter image description here

  • So, check that the file exists (in the working directory where the executable is run) and is accessible, and it contains the required schema.

    •  Tags:  
    • Related