; works Local $sqlCLI = 'sqlite3.exe C:/Users/AppData/Local/Temp/~knakvog.tmp ".read sql2csv.txt" '
Local $sqlCLI = 'sqlite3.exe C:/Users/AppData/Local/Temp/~knakvog.tmp < xpt2csv.txt '
Local $openCSV = Run(@ComSpec & " /k " & $sqlCLI,@ScriptDir,@SW_HIDE)
Much less impressive than I hoped for.
Change the @SW_HIDE to MAX to see the results of the labour.
It appears as if SQLITE3.EXE can accept one argument after the dbfile name, so the ".read..." works. But it does not allow multiple consecutive parameters.
-- sql text file content sql2.csv.txt
.headers on
.mode csv
.once dataout.csv
SELECT * FROM memCSV;
.system dataout.csv
.quit
The above line reads the 'sql2csv.txt' file using either of the "< or .read" options, and executes correctly.
Trying to stipulate all in the AutoIt command line results in failure
Line below does NOT work.
; not working Local $sqlCLI = 'sqlite3.exe "C:/Users/AppData/Local/Temp/~knakvog.tmp" ".headers on" ".mode csv" ".once dataout.csv" SELECT * FROM memCSV; ".system dataout.csv" '
Failure appears to be a native SQLITE3 "too many parameters" issue and not related to AutoIt.