Re: [sqlite] VACUUM command issue

2012-01-04 Thread Tarun
Thank you for your reply. Pragma wal_checkpoint gave reduced file size. But I still dont know why DB file size increased when I deleted all records .. Can you please clarify this issue? Thanks in advance. On 04-Jan-2012 5:42 PM, "Richard Hipp" wrote: On Wed, Jan 4, 2012 at

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Richard Hipp
On Wed, Jan 4, 2012 at 6:06 PM, Tilsley, Jerry M. wrote: > Anyway to make the new version the default for the sqlite command when > executed from various directories? > Statically link SQLite with your application. Then you always know which version it is using. I beg

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Tilsley, Jerry M.
Anyway to make the new version the default for the sqlite command when executed from various directories? Sent from my Verizon Wireless Device Simon Slavin wrote: On 4 Jan 2012, at 9:43pm, Tilsley, Jerry M. wrote: > Ok, I'm ending up with two versions of SQLite installed on my system because

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Stephan Beal
Try: # export LD_LIBRARY_PATH=/path/to/your/libs:$LD_LIBRARY_PATH # your commands here... (sorry, i'm on a mobile phone lying in bed or i'd be more specific/detailed!) - stephan beal http://wanderinghorse.net/home/stephan/ On Jan 5, 2012 12:07 AM, "Tilsley, Jerry M."

Re: [sqlite] retrieve data from movie sqlite database

2012-01-04 Thread BareFeetWare
On 05/01/2012, at 1:48 AM, Petite Abeille wrote: >> select >> "cast".character_name as "Character Name" >> ,"actors".name || ' ' || actors.surname as "Actor" >> ,group_concat("other movies".title, ', ') as "Other movies where we've >> seen this actor" >> from "movies" >> join

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Simon Slavin
On 4 Jan 2012, at 9:43pm, Tilsley, Jerry M. wrote: > Ok, I'm ending up with two versions of SQLite installed on my system because > one was install with RPM and the latest is a tarball. How do I get the > tarball to overwrite the pre-existing version? I recommend that you not worry about

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Tilsley, Jerry M.
Ok, I'm ending up with two versions of SQLite installed on my system because one was install with RPM and the latest is a tarball. How do I get the tarball to overwrite the pre-existing version? Jerry Tilsley, Sr Systems Analyst St. Claire Regional Medical Center Morehead, Ky P: 606-783-6563

Re: [sqlite] SQLite read-only code

2012-01-04 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/01/12 12:43, Baruch Burstein wrote: > Is there any way to compile sqlite without any support for writing to > the database? Basically just support SELECT? Note that in normal usage SQLite does have to be able to write even to a database that

Re: [sqlite] (no subject)

2012-01-04 Thread Kees Nuyt
On Wed, 4 Jan 2012 17:21:18 +0530, Tarun wrote: >Hi All, > >I am running program in which I have created SQLite DB file using: >sqlite3_open_v2() > >configured it: > >PRAGMA journal_mode = WAL >PRAGMA synchronous=OFF > >Then created one table into SQLiteDB by using

Re: [sqlite] How to sort within a text field

2012-01-04 Thread Kit
2012/1/3 guiz : > Hi all, if I have a table like > CREATE TABLE [a] ( > [ID] INTEGER  NOT NULL, > [prdtype] VARCHAR(35)  NOT NULL > ) > > and data already inserted as > > insert into a (ID, prdtype) values (1, '15'); > insert into a (ID, prdtype) values (2, '15|10|27|3'); >

[sqlite] SQLite read-only code

2012-01-04 Thread Baruch Burstein
Is there any way to compile sqlite without any support for writing to the database? Basically just support SELECT? We are trying to use it for reading files in our system, but every byte we can squeeze out of the lib would help. -- Programming today is a race between software engineers striving

[sqlite] SegV at sqlite3_open() (Was: Re: How to sort within a text field)

2012-01-04 Thread Peter Aronson
> But it segfaults on me at sqlite3_open() and I can't figure out why...there's >no stack info. That's because you have it in the same file that sqlite3ext.h is included in, and the call to sqlite3_open() is really to sqlite3_api->open(), but since you haven't executed SQLITE_EXTENSION_INIT2

[sqlite] Lemon: broken lookahead propagation?

2012-01-04 Thread Vincent Zweije
I may have hit a bug in the lemon parser generator. It looks like lookahead symbols aren't propagated properly, in some cases. The consequence is that in some states, valid symbols are rejected with a syntax error. The complete grammar can be found at http://www.zweije.nl/~vzweije/parser.y

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Stephan Beal
On Wed, Jan 4, 2012 at 4:40 PM, Simon Slavin wrote: > In that case, the problem is not caused by a corrupt database file. It > now seems more likely that you have discovered an obscure bug, or are using > a version of SQLite not compiled for your platform, or have some

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Simon Slavin
On 4 Jan 2012, at 3:37pm, Tilsley, Jerry M. wrote: > I done as you requested and built a new file. The new TEA extension still > fails with SEGMENTATION FAULT when trying to perform backup. In that case, the problem is not caused by a corrupt database file. It now seems more likely that you

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Tilsley, Jerry M.
Simon, I done as you requested and built a new file. The new TEA extension still fails with SEGMENTATION FAULT when trying to perform backup. Jerry Tilsley, Sr Systems Analyst St. Claire Regional Medical Center Morehead, Ky P: 606-783-6563 -Original Message- From:

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Simon Slavin
On 4 Jan 2012, at 1:53pm, Tilsley, Jerry M. wrote: > How can I "upgrade" the existing database files to the new version? Use the sqlite3 shell tool to open the database. You can download a precompiled version here: Open the database OS prompt> sqlite3

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Tilsley, Jerry M.
Looks like the file was filtered out, how do I post this out where you can look at it? Jerry Tilsley, Sr Systems Analyst St. Claire Regional Medical Center Morehead, Ky P: 606-783-6563 -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Tilsley, Jerry M.
Attached is one of the databases I am having trouble with. If I use the new version of SQLite to back up the file it works, if I use the new TEA lib I get the segmentation fault. Jerry Tilsley, Sr Systems Analyst St. Claire Regional Medical Center Morehead, Ky -Original Message-

Re: [sqlite] retrieve data from movie sqlite database

2012-01-04 Thread Petite Abeille
On Jan 4, 2012, at 4:01 PM, Igor Tandetnik wrote: >> Unfortunately, looks like this query will filter out actors that have >> performed in only that one movie > > Just change the last two joins to LEFT JOIN. And the where clause. And perhaps add an explicit group by.

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Dan Kennedy
On 01/04/2012 08:53 PM, Tilsley, Jerry M. wrote: I did manage to get the new version installed on the system, but the issue persists. But I did create a new database file under the 3.7.9 version and can back this up with no problem, but the database files under the 3.6.4 version crash. How

Re: [sqlite] retrieve data from movie sqlite database

2012-01-04 Thread Igor Tandetnik
Petite Abeille wrote: > On Jan 4, 2012, at 12:50 PM, BareFeetWare wrote: > >> Yes. This works with the above schema: >> >> select >> "cast".character_name as "Character Name" >> , "actors".name || ' ' || actors.surname as "Actor" >> , group_concat("other movies".title,

Re: [sqlite] retrieve data from movie sqlite database

2012-01-04 Thread Petite Abeille
On Jan 4, 2012, at 12:50 PM, BareFeetWare wrote: > Yes. This works with the above schema: > > select > "cast".character_name as "Character Name" > , "actors".name || ' ' || actors.surname as "Actor" > , group_concat("other movies".title, ', ') as "Other movies where we've > seen

[sqlite] /**** ERROR: (11) database disk image is malformed *****/

2012-01-04 Thread Folkert van Heusden
Hi, Occasionally my sqlite database (which recides on a jffs2 filesystem on a nor flash) gets corrupt. Of course, I would like to fix that. While debugging such a corrupt database, I found the following: Pgno: 2 btreeInitPage: corrupt flag byte is: 01 database corruption at line 49445 of

Re: [sqlite] How to sort within a text field

2012-01-04 Thread Black, Michael (IS)
Your question made me want to do something I've been meaning to for a while...a custom function. So...the following words as loadable extension (at least for the shell) gcc -g -shared -fPIC -o sortprds.sqlext sortprds.c sqlite3 test.db SQLite version 3.7.9 2011-11-01 00:52:41 Enter

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Tilsley, Jerry M.
I did manage to get the new version installed on the system, but the issue persists. But I did create a new database file under the 3.7.9 version and can back this up with no problem, but the database files under the 3.6.4 version crash. How can I "upgrade" the existing database files to the

Re: [sqlite] Restrict SQLite to Single user mode usage

2012-01-04 Thread Stephan Beal
On Wed, Jan 4, 2012 at 2:44 PM, Pallavi Sharma wrote: > I want to know how can i restrict the sqlite database usage to a single > user mode. > > On a Unix system: # chown username dbname # chmod 0600 dbname but that won't protect it against the same user attaching to it

[sqlite] Restrict SQLite to Single user mode usage

2012-01-04 Thread Pallavi Sharma
Hi, I want to know how can i restrict the sqlite database usage to a single user mode. how can one achieve it like in sqlserver etc Regards Pallavi ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Richard Hipp
On Wed, Jan 4, 2012 at 8:23 AM, Tilsley, Jerry M. wrote: > I use the tcl commands: > > Sqlite3 db h.db > Db backup h.bak > > This causes the segmentation fault and this happens with any database. > Would this be because Sqlite 3.6.4 was used to create them, or maybe I >

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Tilsley, Jerry M.
I use the tcl commands: Sqlite3 db h.db Db backup h.bak This causes the segmentation fault and this happens with any database. Would this be because Sqlite 3.6.4 was used to create them, or maybe I need to generate all the binaries for 3.7.9 because I only made the TEA libraries so far.

Re: [sqlite] VACUUM command issue

2012-01-04 Thread Richard Hipp
On Wed, Jan 4, 2012 at 6:52 AM, Tarun wrote: > Hi All, > > I am running program in which I have created SQLite DB file using: > sqlite3_open_v2() > > configured it: > > PRAGMA journal_mode = WAL > PRAGMA synchronous=OFF > > Then created one table into SQLiteDB by using

Re: [sqlite] (no subject)

2012-01-04 Thread Stephan Beal
On Wed, Jan 4, 2012 at 12:51 PM, Tarun wrote: > Waiting for your response, I am stuck in my work. > The physical size of the db file is an implementation detail, not a well-published behaviour with concrete reproducible results, and should in no way affect your use of

[sqlite] VACUUM command issue

2012-01-04 Thread Tarun
Hi All, I am running program in which I have created SQLite DB file using: sqlite3_open_v2() configured it: PRAGMA journal_mode = WAL PRAGMA synchronous=OFF Then created one table into SQLiteDB by using sqlite3_exec() in which I passed SQL command of creating table. After configuration,

[sqlite] (no subject)

2012-01-04 Thread Tarun
Hi All, I am running program in which I have created SQLite DB file using: sqlite3_open_v2() configured it: PRAGMA journal_mode = WAL PRAGMA synchronous=OFF Then created one table into SQLiteDB by using sqlite3_exec() in which I passed SQL command of creating table. After configuration,

Re: [sqlite] retrieve data from movie sqlite database

2012-01-04 Thread BareFeetWare
On 04/01/2012, at 8:06 PM, E3 wrote: > I've a SQLite db containing data about movies. Implementing your description into a schema: create table "movies" ( movie_id integer primary key not null , title text collate nocase not null , year integer ) ; create table "actors" (

Re: [sqlite] sqlite3_bind_text(): unable to insert "const char*" data into the database.

2012-01-04 Thread Dan Kennedy
On 01/04/2012 05:02 PM, Phong Cao wrote: Hello everybody, I am trying to develop a small music manager using Gtkmm, GStreamermm& SQLite3 in Linux (Fedora 16 - 64bit). It is able to read metadata (track, title, artist, album, etc...) of all the files using GStreamermm& inserts these metadata

[sqlite] sqlite3_bind_text(): unable to insert "const char*" data into the database.

2012-01-04 Thread Phong Cao
Hello everybody, I am trying to develop a small music manager using Gtkmm, GStreamermm & SQLite3 in Linux (Fedora 16 - 64bit). It is able to read metadata (track, title, artist, album, etc...) of all the files using GStreamermm & inserts these metadata into the underlying SQLite database. Then it

[sqlite] re trieve data from movie sqlite database

2012-01-04 Thread E3
Hi, I'm not a db/SQL/SQLite expert and this is for sure a newbie question, so feel free to skip it if you think this is too entry level. I've a SQLite db containing data about movies. The main table (movies) contains: movie_id (autoincrement, primary); title; year; Then I have the