Hi Kent,
Have you tried unblocking the downloaded chm: (icon right-click->properties->Unblock click)
Here is your sqLite class:
'SqliteC.inc
'SqliteC inc file
'Last modified:
'2011.07.05 06:37 KS
include once "ConsoleC.inc"
extern lib "sqlite3.dll"
sys sqlite3_open ( zstring* name, sys* db )
sys sqlite3_exec ( sys db , zstring* s, sys p1, sys p2, sys* dberr )
sys sqlite3_prepare_v2 ( sys db , zstring* s, sys p1, sys* stmt, sys p2 )
sys sqlite3_step ( sys n )
zstring* sqlite3_column_text ( sys row , sys col )
sys sqlite3_close ( sys db )
end extern
#define SQLITE_ROW 100
class SqliteC
private
sys mHdb
string mFile
string mTable
sys mError
sys mStmt
sys mRows
sys mRow
sys mClmn
zstring* mErrMsg
ConsoleC c
public
method Constructor( optional string aFile = ":memory:" )
c.Constructor "SqliteC Console"
mFile = aFile
sqlite3_open mFile, mHdb
if mError then PrintError
end method
method Destructor()
if mHdb then
sqlite3_close mHdb
if mError then PrintError
end if
c.Destructor
end method
method Open( string aFile )
c.Constructor "SqliteC Console"
mFile = aFile
sqlite3_open mFile, mHdb
if mError then PrintError
end method
method Exec( string aCommand )
sqlite3_exec mHdb, aCommand, 0, 0, mError
if mError then PrintError
end method
method Qry( string aCommand )
string s = ""
sqlite3_prepare_v2 mHdb, aCommand, -1, mStmt, 0
if mError then PrintError
end method
method Scan() as sys
return sqlite3_step( mStmt )
if mError then PrintError
end method
method CTxt( sys aColumn ) as string
return sqlite3_column_text mStmt, aColumn
if mError then PrintError
end method
private
method PrintError()
c.SetColor F_WHITE or B_RED
@mErrMsg = mError
c.Print "ERROR: " mErrMsg " " crlf$ crlf$
c.SetColor DEFAULT_COLOR
mError = 0
end method
end class
Charles