Re: [sqlite] System function with Sqlite

2008-08-13 Thread Chris Wedgwood
On Wed, Aug 13, 2008 at 05:08:26PM +1200, Chris Brown wrote: > At the moment I can replicate this issue simply by having the code > sample in my previous post inside my main function with the sqlite > database variable declaration and thats it. before the system calls can you make a fucntion

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] "unable to open database file" on DROP

2008-08-13 Thread Dennis Cote
D. Richard Hipp wrote: > > (2) Formal and detail requirements that define precisely what SQLite > does. > > http://www.sqlite.org/draft/tokenreq.html > http://www.sqlite.org/draft/syntax.html > These look great. I noticed a few typos, but on the whole they are very good. I

[sqlite] [Delphi] ANSI characters turned into Unicode?

2008-08-13 Thread Gilles Ganault
Hello Using Aducom's free wrapper for Delphi, when using accents in a field, they're turned into (I assume) Unicode: déjà vu, caché, voilà -> déjà vu, caché, voilà ! To be able to tell if it's the wrapper or SQLite itself, is there a function I should call when using accented characters,

Re: [sqlite] [Delphi] ANSI characters turned into Unicode?

2008-08-13 Thread Igor Tandetnik
Gilles Ganault <[EMAIL PROTECTED]> wrote: > Using Aducom's free wrapper for Delphi, when > using accents in a field, they're turned into (I assume) Unicode: > > déjà vu, caché, voilà -> déjà vu, caché, voilà ! This does look like UTF-8 encoded string - misinterpreted to be in Latin-1 codepage.

Re: [sqlite] setting a foreign key in a trigger

2008-08-13 Thread Bruce Clift
Thanks for the responses. This sounds like just what I will need. --Bruce ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] RTree query

2008-08-13 Thread Hartwig Wiesmann
I have two tables with about 100 000 rows. One is the main data table and the other an RTree table. I started a query like described at http://www.sqlite.org/rtree.html: SELECT data.location_name FROM data, rtree WHERE data.id=rtree.id AND rtree.x >= 0 AND rtree.x <= 10; This runs for about

Re: [sqlite] System function with Sqlite

2008-08-13 Thread Chris Brown
> before the system calls can you make a fucntion that does a > open/readdir of /proc/self/fd/ and prints the results (to compare > before and after)? Hi Chris- I did as you suggested and I had the following returned before sqlite3_openis called: . .. 0 1 2 3 Then this after sqlite3_close but

Re: [sqlite] [Delphi] ANSI characters turned into Unicode?

2008-08-13 Thread Gilles Ganault
On Wed, 13 Aug 2008 14:24:25 -0400, "Igor Tandetnik" <[EMAIL PROTECTED]> wrote: >This does look like UTF-8 encoded string - misinterpreted to be in >Latin-1 codepage. Indeed, the wrapper uses UTF8 by default. Setting it to Standard solved the issue. Thanks.

Re: [sqlite] System function with Sqlite

2008-08-13 Thread Chris Brown
> #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

Re: [sqlite] System function with Sqlite

2008-08-13 Thread Stephen Oberholtzer
What does strace reveal? -- -- Stevie-O Real programmers use COPY CON PROGRAM.EXE ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQL error: disk I/O error, for attached DBs on power PC

2008-08-13 Thread France Hsu
Hi! All, After using strace, we found the root cause. SQLite will use some temporary files to keep the select (with union all) result. See: http://www.sqlite.org/tempfiles.html In our system, we allocated 32M for /, and there are only 19M after booting up the system. SQLite can not get enough

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 Chris Brown
> that seems wrong, for those which are symlinks (ie. 0->6) can you also > readlink and print that out too please? > > it seems like some fd's are beinh held open > > as a work around you can loop over these fd's (say 2 though 255) and > set FD_CLOEXEC (lots of things do this, it's a but of a hack