Here is a code snippet out of T4 for getting the data out of and putting data into an SQLite3 database:
[39] :case 'Dump'
[40] (cmd file)←2↑rarg
[41] temp_path←DATAPATH
[42] ∆path←(↑temp_path) ⎕chdir temp_path ⍝ save current path
[43]
[44] :try
[45] ext←⌽'.' Before ⌽ file
[46] tmp←TmpFile ext
[47] rc←0 NCopy file tmp
[48] :if 0=rc
[49] rc←'Copy Error' 'x' WMsg 'Unable to create temporary SQL dump file' 'Quit'
[50] →0
[51] :end
[52]
[53] DeleteFile 'dump.sql'
[54] script←'.output dump.sql',⎕tcnl,⎕tclf,'.dump',⎕tcnl,⎕tclf,'.quit',⎕tcnl,⎕tclf
[55] script NSave 'script'
[56] cmdline←sqlite3,' ',tmp,' < script'
[57] 3 ⎕cmd ⎕←cmdline
[58] ⍝ ret←ReadHyperlink NRead 'dump.sql'
[59] ret←NRead 'dump.sql'
[60] :catchall
[61] 'Error' 'x' WMsg ⎕dm 'Quit'
[62] ret←''
[63] :finally
[64] DeleteFile ¨ 'script' 'dump.sql' tmp
[65] (↑∆path) ⎕chdir ∆path
[66] :end
[67] :case 'CreateDB'
[68] :try
[69] (cmd path file sql)←4↑rarg
[70] ∆path←(↑DATAPATH) ⎕chdir DATAPATH
[71]
[72] name←⌽'.' After ⌽file
[73]
[74] sql NSave name,'.sql'
[75]
[76] :if ~IsFile 'sqlite3.exe' ⍝ should be there if setup correctly.
[77] NCopy (ExePath,'\sqlite3.exe') ('sqlite3.exe')
[78] :end
[79]
[80] sql←DLTB name,'.sql'
[81] file←'"',file,'"'
[82] sql←'"',sql,'"'
[83] cmdline←'sqlite3 ',file,' < ',sql
[84] :if 20000<⍴cmdline
[85] 'Command Line Too Long' '!' WMsg ('Length: ',⍕⍴cmdline) 'Quit'
[86] :else
[87] DeleteFile file←file~'"'
[88] 3 ⎕cmd cmdline
[89] :if IsFile file
[90] rc←0 NCopy file (path,'\',file)
[91] :if 0=rc
[92] 'Unable to move file' 'x' WMsg ('From:' ,(DATAPATH,'\',file),⎕tcnl,⎕tcnl,'To: ',(path,'\',file)) 'Quit'
[93] :else
[94] :if BATCHMODE=0
[95] 'File Created' 'i' WMsg (path,⎕tcnl,file) 'OK'
[96] :end
[97] DeleteFile file
[98] :end
[99] :else
[100] 'Failed to Create File' 'x' WMsg file 'Quit'
[101] :end
[102] :end
[103] :catchall
[104] 'Error' WMsg ⎕dm 'Quit'
[105] :finally
[106] DeleteFile sql~'"'
[107] (↑∆path) ⎕chdir ∆path
[108] :end
[109]
[110] BUILD←path,'\',file
[111]
[112] :if INSTALL
[113] :andif 'X'=CharUpper ¯1↑BUILD
[114] 1 Shell BUILD
[115] :end
[116]
Note - the BBCode is generated by T4! :-)