Re: [sqlite] Recovering when the SQLite database is corrupt

2006-06-13 Thread Darren Duncan
At 6:23 AM +0200 6/14/06, Olaf Beckman Lapré wrote: Hi, I'm using SQLite as the storage engine in my e-mail client but I'm worried that a user crashes or kills the client during normal operation resulting in a corrupted SQLite database. If the file is corrupted I'm afraid the user's entire e

[sqlite] Recovering when the SQLite database is corrupt

2006-06-13 Thread Olaf Beckman Lapré
Hi, I'm using SQLite as the storage engine in my e-mail client but I'm worried that a user crashes or kills the client during normal operation resulting in a corrupted SQLite database. If the file is corrupted I'm afraid the user's entire e-mail database may be lost. Are there any standard pr

[sqlite] How to add a table ?

2006-06-13 Thread Thierry Nauze
Hello, I have a database. I want to add a table with columns id integer name varchar addresse varchar ... Which instructions (exactly) I have to give. I work with REALBASIC 2006 on Mac Thank you -- Thierry NAUZESaint-Denis de la Réunion

Re: [sqlite] vacuum changes db format

2006-06-13 Thread drh
JP <[EMAIL PROTECTED]> wrote: > I don't know if it is a bug or works as designed, but, should VACUUM be > changing the format of the DB? > > I created a database with sqlite 3.2.7, and after a VACUUM in sqlite > 3.3.6 I could no longer open it in the older program - error message #1, > unsuppor

[sqlite] vacuum changes db format

2006-06-13 Thread JP
I don't know if it is a bug or works as designed, but, should VACUUM be changing the format of the DB? I created a database with sqlite 3.2.7, and after a VACUUM in sqlite 3.3.6 I could no longer open it in the older program - error message #1, unsupported file format. jp

Re[2]: [sqlite] Avoiding Fragmentation of SQLite database file ???

2006-06-13 Thread Teg
Hello Jeff, Tuesday, June 13, 2006, 5:01:15 PM, you wrote: JM> On 6/13/06, Teg <[EMAIL PROTECTED]> wrote: JM> >> I'd think allocating the space for the file, then copying the SQLite >> DB to this new file, renaming the old and renaming the new would >> defragment the file too. >> >> As an experi

Re: [sqlite] Avoiding Fragmentation of SQLite database file ???

2006-06-13 Thread Jeff Macdonald
On 6/13/06, Teg <[EMAIL PROTECTED]> wrote: I'd think allocating the space for the file, then copying the SQLite DB to this new file, renaming the old and renaming the new would defragment the file too. As an experiment, I copied a 5G db from one filename to another and it changed from 6700 frag

Re: [sqlite] Avoiding Fragmentation of SQLite database file ???

2006-06-13 Thread Teg
Hello RohitPatel, Tuesday, June 13, 2006, 10:43:23 AM, you wrote: R> Hi SQLiteUsers R> Developing MFC Application (Small Business Accounting Application) R> (developed using Visual Studio) R> - App will run on Windows 98/2000 R> - App uses SQLite database files for storage of data R> - I

Re: [sqlite] Wildcards

2006-06-13 Thread Alex Roston
DJ Anubis wrote: Alex Roston a écrit : Ideally I'd like to do something like: "UPDATE card SET foo='100' where bar='ABC*';" Use SQL standard construct: UPDATE card SET foo='100' WHERE bar LIKE 'ABC%' ; Excellent. Thank You. My problems are solved!! Alex

Re: [sqlite] Wildcards

2006-06-13 Thread Alex Roston
Thanks Jay, but I've been there, and didn't see any examples, so I wasn't sure how it fit into the other commands. (I'm a little dull today - too many crisises - crisi? whatever... this week.) Alex Jay Sprenkle wrote: On 6/13/06, Alex Roston <[EMAIL PROTECTED]> wrote: Does SQLite have anyt

Re: [sqlite] Wildcards

2006-06-13 Thread Alex Charyna
I think you mean % not * % is the wildcard. -alex On Jun 13, 2006, at 3:03 PM, Alex Roston wrote: Does SQLite have anything resembling a wildcard function? I need to either get rid or modify a whole group of rows which have some common elements in the primary key. Ideally I'd like to do som

Re: [sqlite] Wildcards

2006-06-13 Thread DJ Anubis
Alex Roston a écrit : > Ideally I'd like to do something like: > > "UPDATE card SET foo='100' where bar='ABC*';" > Use SQL standard construct: UPDATE card SET foo='100' WHERE bar LIKE 'ABC%' ;

Re: [sqlite] Wildcards

2006-06-13 Thread Jay Sprenkle
On 6/13/06, Alex Roston <[EMAIL PROTECTED]> wrote: Does SQLite have anything resembling a wildcard function? I need to either get rid or modify a whole group of rows which have some common elements in the primary key. Ideally I'd like to do something like: "UPDATE card SET foo='100' where bar='

[sqlite] Wildcards

2006-06-13 Thread Alex Roston
Does SQLite have anything resembling a wildcard function? I need to either get rid or modify a whole group of rows which have some common elements in the primary key. Ideally I'd like to do something like: "UPDATE card SET foo='100' where bar='ABC*';" The construct above doesn't work, but is

Re: [sqlite] Avoiding Fragmentation of SQLite database file ???

2006-06-13 Thread René Tegel
Hi, There are several command-line defragmenters (gui as well) available for windows that are able to defragment certain files or directories only, like: http://www.defragmentor.com/dmlcl/en/home.asp http://support.microsoft.com/?kbid=283080 or you may like to create your own routines http://m

Re: [sqlite] Avoiding Fragmentation of SQLite database file ???

2006-06-13 Thread Jay Sprenkle
On 6/13/06, RohitPatel <[EMAIL PROTECTED]> wrote: After using such application, all used SQLite DB files gets fragmented. How to avoid such fragmentation ? You want to use the scheduled task function of windows to run a disk defragmenter. I find that once every two weeks is sufficient f

Re: [sqlite] sqlite system table names

2006-06-13 Thread Jay Sprenkle
On 6/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi, I want to know the names of the system tables in sqlite. I only know of the table sqlite_master. try this: select * from sqlite_master where type = 'table'

Re: [sqlite] sqlite system table names

2006-06-13 Thread drh
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > I want to know the names of the system tables in sqlite. I only know of the > table sqlite_master. sqlite_master is it. there are no others. -- D. Richard Hipp <[EMAIL PROTECTED]>

[sqlite] Re: sqlite system table names

2006-06-13 Thread Igor Tandetnik
[EMAIL PROTECTED] wrote: I want to know the names of the system tables in sqlite. I only know of the table sqlite_master. There's also sqlite_sequence : http://www.sqlite.org/autoinc.html . As far as I know, this is it - there are just two special tables. Igor Tandetnik

[sqlite] sqlite system table names

2006-06-13 Thread [EMAIL PROTECTED]
Hi, I want to know the names of the system tables in sqlite. I only know of the table sqlite_master. Thanks in advance. Bill

[sqlite] Avoiding Fragmentation of SQLite database file ???

2006-06-13 Thread RohitPatel9999
Hi SQLiteUsers Developing MFC Application (Small Business Accounting Application) (developed using Visual Studio) - App will run on Windows 98/2000 - App uses SQLite database files for storage of data - It will have one database for each company accounts/info. So if accounts of 10 companies, th

[sqlite] Which is most appropriate encoding ?

2006-06-13 Thread RohitPatel9999
Hi SQLiteUsers, Need some guidance. While developing Win32/MFC Application (with Visual C++ 6.0) - Application uses SQLite DB for it's data storage - Application must run on most windows (Windows 98, ME, NT, XP, 2000) - User should be able to copy Database from one PC to another PC (one PC may

Re: [sqlite] Problem with lempar.c revision 1.17

2006-06-13 Thread drh
"Garrett Rooney" <[EMAIL PROTECTED]> wrote: > On 6/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > "Garrett Rooney" <[EMAIL PROTECTED]> wrote: > > > I've been using lemon as the parser generator for ETL > > > and we've been running into some problems with recent > > > versions. The first p

Re: [sqlite] Problem with lempar.c revision 1.17

2006-06-13 Thread Garrett Rooney
On 6/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: "Garrett Rooney" <[EMAIL PROTECTED]> wrote: > I've been using lemon as the parser generator for ETL > (http://etl.i-want-a-pony.com/) an open source C based template > language, and we've been running into some problems with recent > versio

Re: [sqlite] Problem with lempar.c revision 1.17

2006-06-13 Thread drh
"Garrett Rooney" <[EMAIL PROTECTED]> wrote: > I've been using lemon as the parser generator for ETL > (http://etl.i-want-a-pony.com/) an open source C based template > language, and we've been running into some problems with recent > versions. The first problem is in revision 1.17 of lempar.c. Yo

[sqlite] how to create an autoincremented rowid in a view

2006-06-13 Thread jt
Hello, Is there a way to have the rowid not null in a view? .nullvalue NULL create table t(c); insert into t values(1); insert into t values(2); create view v as select * from t, t as t2; select rowid, * from v; -

RE: [sqlite] Re: How to realize the ROWID in a view?

2006-06-13 Thread James Moore
I have a similar problem (I am using SQLite as a on disk local cache for a list of about 1,000,000 rows and then filtering and sorting that list as needed) and a slightly different solution, The best way I have come up with so far is to create a virtual table with a INTEGER PRIMARY KEY on it - IE