Hi everyone,
I can access the smat databases without issue. I am now looking to access the error db in the same manner. When running the script, I get back the error “file is not a database”. Any ideas where I am going wrong?
Using elog.elogdb as the database and the site name as the key
if {[catch {sqlite3 db $smat_file -readonly 1} open_err]} {
echo “Failed to open database: $open_err”
exit 1
}
db eval “PRAGMA KEY=MY_KEY”
set open_request [db errorcode *$smat_file]
echo “open_request $open_request”
set table_name “elog_msgs”
set header_printed 0
set query [db eval “SELECT * FROM $table_name LIMIT 5”]
db close