Re: [sqlite] SQLITE_prepare/bind to exnter data or just query?

2008-08-14 Thread Peter Holmes
flakpit wrote: > Peter, sorry to be a nuisance but, can you update the same way? I've not > idea how that statement would look with this way of doing things Yep: sqlite3_prepare_v2(db,"UPDATE ans SET col1=?, col2=?;",-1,,NULL); sqlite3_bind_text(stmt,1,"Peter's",-1,SQLITE_STATIC);

Re: [sqlite] SQLITE_prepare/bind to exnter data or just query?

2008-08-14 Thread Peter Holmes
flakpit wrote: > > Peter Holmes-4 wrote: >> Yep. Works great! For example: >> >> sqlite3_prepare_v2(db,"INSERT INTO ans VALUES (?,?);",-1,stmt,NULL); >> sqlite3_bind_text(stmt,0,"Peter's",-1,SQLITE_STATIC); >> sqlite3_bind_tex

Re: [sqlite] SQLITE_prepare/bind to exnter data or just query?

2008-08-14 Thread Peter Holmes
DOH! sqlite3_prepare_v2(db,"INSERT INTO ans VALUES (?,?);",-1,,NULL); sqlite3_bind_text(stmt,1,"Peter's",-1,SQLITE_STATIC); sqlite3_bind_text(stmt,2,"Reply",-1,SQLITE_STATIC); sqlite3_step(stmt); sqlite3_reset(stmt); I'll shut up now... ___

Re: [sqlite] SQLITE_prepare/bind to exnter data or just query?

2008-08-14 Thread Peter Holmes
Make that: sqlite3_prepare_v2(db,"INSERT INTO ans VALUES (?,?);",-1,,NULL); ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLITE_prepare/bind to exnter data or just query?

2008-08-14 Thread Peter Holmes
Yep. Works great! For example: sqlite3_prepare_v2(db,"INSERT INTO ans VALUES (?,?);",-1,stmt,NULL); sqlite3_bind_text(stmt,0,"Peter's",-1,SQLITE_STATIC); sqlite3_bind_text(stmt,1,"Reply",-1,SQLITE_STATIC); sqlite3_step(stmt); sqlite3_reset(stmt); flakpit wrote: > I've been escaping single

Re: [sqlite] System function with Sqlite

2008-08-13 Thread Peter Holmes
Again, for what it's worth: I'm using gcc 4.1.3 and I've successfully run this as myself, using sudo, and as root. While I realize we're not talking Windoze, have you tried rebooting, recompling, and rerunning it? > Hi Peter- Yes I'm running the code as you've put above and I used the full >

Re: [sqlite] System function with Sqlite

2008-08-13 Thread Peter Holmes
#include "sqlite3.h" main(int argc, char **argv) { static sqlite3 *db; system("whoami"); sqlite3_open("junk.dbs", ); sqlite3_close(db); system("whoami"); } Works fine on mine, Chris. FWIW I did use the full source tree (the .tar.gz file) for compilation and install of

Re: [sqlite] System function with Sqlite

2008-08-12 Thread Peter Holmes
int main(int argc, char **argv) { int i; system("rm ppi.dbs ; sqlite3 ppi.dbs \".read ppi_create.sql\""); wait(NULL); /* open the database */ db_connect(); /* which calls sqlite3_open() */ system("echo what?"); wait(NULL); . . . } Works for me

Re: [sqlite] Looking for generic speed test results

2008-08-12 Thread Peter Holmes
I'd be glad to post results for Ubuntu 7.10 on a Dell Inspiron 530 (Dual Core 1.6Ghz) if you're interested. Just supply source code, compile options you want me to use, etc. Noah Hart wrote: > I understand that memory, disk and processor all play a part in the > speed test results. > >

Re: [sqlite] Possible Error in 3.6.0?

2008-08-07 Thread Peter Holmes
Skip step 6 above. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Possible Error in 3.6.0?

2008-08-07 Thread Peter Holmes
Shane wrote: > This was previously reported, and couldn't be reproduced. > > http://www.sqlite.org/cvstrac/tktview?tn=3262 > > Any help in recreating it would be appreciated. > > -Shane I did the following: 1. Installed vanilla Ubuntu 7.10 + software development 2. Downloaded,

[sqlite] Possible Error in 3.6.0?

2008-08-06 Thread Peter Holmes
FWIW, on a Dell Inspiron 530 running Ubuntu 7.10 with Tcl8.4 installed, ../configure --with-tcl=/usr/lib/tcl8.4 make works fine, but make fulltest generates the following: perm-memsubsys1.tcl-1.1... Expected: [1 {wrong # args: should be "sqlite3 HANDLE FILENAME ?-vfs