Re: LibCurl 4 and SQLite 3 wrappers
- Posted by euphoric (admin) Aug 29, 2019
- 1097 views
ADDED: I'm on Windows 8, Euphoria 4.1 64-bit.
This doesn't seem right.
I'm getting this output running the test_sqlite3.ex.
deviceList: { { "", "OneOS", "", "Last_update", "", "Status", "", "Last_check", "", "Config", "" }, { "Orange Labs", "", "192.168.2.110", "", "admin", "", "admin", "", "LBB_132", "", "BOOT12-SEC-V3.4R3E37C" } }
The output of this test app doesn't seem right, either:
include std/pretty.e include std/console.e include sqlite3.e sequence res sequence sql sequence db_name = "mydb.sqlite" atom sql_db = sqlite_open(db_name, 0) if sql_db <= 0 then puts(1, "Couldn't open SQLite database\n") else puts(1,"Opened " & db_name) -- make sure 'categories' table exists res = exec_sql_command(sql_db, "CREATE TABLE IF NOT EXISTS categories ( id INTEGER PRIMARY KEY AUTOINCREMENT, parent INTEGER, name TEXT, data TEXT );") puts(1,"\n\tcreated sql table categories") end if -- test the sql db sql = `INSERT INTO categories (parent,name,data) VALUES (0,"departments","https://www.onlinesuperstore.com/browse/");` puts(1,"\n" & sql) res = exec_sql_command(sql_db,sql) puts(1,"\n") ?res wait_key() res = exec_sql_command(sql_db,`SELECT * FROM categories`) pretty_print(1,res,{3}) wait_key()
Opened mydb.sqlite created sql table categories INSERT INTO categories (parent,name,data) VALUES (0,"departments","https://www.o nlinesuperstore.com/browse/"); {} { { "id", "", "parent", "" }, { "name", "", "data", "" } }
What's going on?