Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   sqlite with nsis (http://forums.winamp.com/showthread.php?t=338379)

NOCaut 28th November 2011 07:58

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

pengyou 28th November 2011 10:02

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.

NOCaut 28th November 2011 11:28

please show me how you oped database and send request?

pengyou 28th November 2011 12:15

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)

NOCaut 28th November 2011 14:50

not understand
please show simple query

MSG 28th November 2011 16:03

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.

NOCaut 28th November 2011 16:12

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

NOCaut 29th November 2011 09:41

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

NOCaut 29th November 2011 09:50

How run two command in one cmd line?

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

NOCaut 29th November 2011 11:05

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

NOCaut 30th November 2011 06:58

Quote:

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.


All times are GMT. The time now is 17:33.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.