Add a reference to System.Data.SQLite
then in your code add:
Code: Select all
USING System.Data.SQLite
Code: Select all
USING System.Data.SQLite
Code: Select all
FUNCTION XTester( nChoice AS INT, cDB AS STRING ) AS VOID STRICT
USING System.Data.SQLite
VAR db := SQLiteConnection{"Data Source=" + cDB + ";Version=3;"}
db:Open()
USING VAR cmd := SQLiteCommand{"SELECT * from Master", db}
USING VAR rdr := cmd:ExecuteReader()
WHILE rdr:Read()
ENDDO
RETURN
Code: Select all
error XS9002: Parser: unexpected input 'VAR' 350,2 Start_Start.prg XTester
Code: Select all
USING System.Data.SQLite
FUNCTION XTester( nChoice AS INT, cDB AS STRING ) AS VOID STRICT
VAR db := SQLiteConnection{"Data Source=" + cDB + ";Version=3;"}
db:Open()
USING VAR cmd := SQLiteCommand{"SELECT * from Master", db}
USING VAR rdr := cmd:ExecuteReader()
WHILE rdr:Read()
ENDDO
RETURN
Code: Select all
FUNCTION XTester( nChoice AS INT, cDB AS STRING ) AS VOID STRICT
BEGIN USING VAR db := SQLiteConnection{"Data Source=" + cDB + ";Version=3;"}
db:Open()
BEGIN USING VAR cmd := SQLiteCommand{"SELECT * from Master", db}
BEGIN USING VAR rdr := cmd:ExecuteReader()
WHILE rdr:Read()
ENDDO
END USING
END USING
END USING
RETURN
Code: Select all
System.DllNotFoundException: Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum op)
at System.Data.SQLite.SQLite3.StaticIsInitialized()
at System.Data.SQLite.SQLiteLog.Initialize(String className)
at System.Data.SQLite.SQLiteConnection..ctor(String connectionString, Boolean parseViaFramework)
at System.Data.SQLite.SQLiteConnection..ctor(String connectionString)
at FRW.Exe.Functions.XTester(Int32 nChoice, String cDB) in C:XIDEProjectsFPSQLiteFRWStart_Start.prg:line 350
at XAPP.StartInitProg(__Usual[] Xs$Args) in C:XIDEProjectsFPSQLiteFRWStart_Start.prg:line 127
at XAPP.Start(__Usual[] Xs$Args) in C:XIDEProjectsFPSQLiteFRWStart_Start.prg:line 40
at FRW.Exe.Functions.Start() in C:XIDEProjectsFPSQLiteFRWStart_Start.prg:line 7
Code: Select all
error XS0009: Metadata file 'C:Program Files (x86)XSharpExtensionProjectSQLite.Interop.dll' could not be opened -- PE image doesn't contain managed metadata.