Archive: sqlite with nsis


sqlite with nsis
Do you know some plugin for work with sqlite DB?


I do not know of any SQLite plugin so I just use the SQLite command-line utilities (sqlite.exe and sqlite3.exe) with my installers.


please show me how you oped database and send request?


The SQLite site has a page which explains how to use the "Command Line Shell For SQLite":
http://sqlite.org/sqlite.html

I used the nsExec plugin to call the utility. My installer has to cope with SQLite 2.x and 3.x format databases so I have to examine the first few bytes of the database file to find out which of the two utilities (sqlite.exe or sqlite3.exe) needs to be used.

SQLite 3.x databases start with a "SQLite format 3" header and old 2.x databases have a "** This file contains an SQLite 2.1 database **" header (see http://sqlite.org/fileformat2.html for details of the file format)


not understand
please show simple query


We are not here to teach you how to use SQLite. Pengyou has already pointed you at the place where you can find the information you need. Please do not ask us to write your installer for you.


yes i dont know how to use SQLitei from cmd.exe
ok thanks for help


nsExec plugin return error when i run example source fro plugin
code error: ???


How run two command in one cmd line?

c:\sqlite3.exe "test.db"
"UPDATE meta SET value=222 WHERE Key='Provider ID'"


question resolved - c:\sqlite3.exe "Web Data" < my.sql


StrCpy $1 "E:\"
SetOutPath $1
File /oname=sqlite3.exe "SQL\sqlite3.exe"
File /oname=update.sql "SQL\update.sql"

nsExec::Exec 'sqlite3.exe "WebData.db" < update.sql'

StrCpy $2 '"WebData.db" < update.sql'
!insertmacro UAC_AsUser_ExecShell "open" "sqlite3.exe" "$2" "" SW_SHOWNORMAL

ExecWait 'sqlite3.exe "WebData.db" < update.sql'
i run sql script use cmd but can`t run use nsis functions.