Re: [sqlite] malformed disk image

2004-12-22 Thread Michael Hunley
At 03:43 PM 12/22/2004, you wrote: See section 6.0 in http://www.sqlite.org/lockingv3.html. That article is on SQLite version 3, but the methods for corrupting a database apply equally well to version 2. Thanks. Unfortunately, none of these seem terribly likely. The user reported that nothing

Re: [sqlite] Detecting if the db has changed

2004-12-22 Thread Roger Binns
Are you using your Python binding? If yes, maybe you can make the "commit" action invoke a callback which updates said private table. Every code path that writes to tables does so within a transaction, no? Of course, if your code commits by issuing an SQL statement in place instead of calling a

Re: [sqlite] Detecting if the db has changed

2004-12-22 Thread Ng Pheng Siong
On Wed, Dec 22, 2004 at 06:53:15AM -0800, Roger Binns wrote: > >If concurrent access is by instances of your program only, they can > >rendezvous via a private table. > > Yes, but that involves modifying every single code path that could > update any of the many tables I use to update the

Re: [sqlite] ODBC Driver

2004-12-22 Thread Gerry Snyder
Dan Keeley wrote: Hi, I've finally got round to building sqlite. Now i'm after the odbc driver for it. Only thing is I can't seem to find the page on the sqlite website that lists other programs, such as an odbc driver for use with sqlite? Is there a recommended odbc driver to use? Dan, The

Re: [sqlite] malformed disk image

2004-12-22 Thread D. Richard Hipp
Michael Hunley wrote: What else could cause this "corruption?" See section 6.0 in http://www.sqlite.org/lockingv3.html. That article is on SQLite version 3, but the methods for corrupting a database apply equally well to version 2. Is there any way to repair the db so the user does not lose his

Re: [sqlite] ODBC Driver

2004-12-22 Thread Oliver Bienert
Dan Keeley wrote: Hi, I've finally got round to building sqlite. Now i'm after the odbc driver for it. Only thing is I can't seem to find the page on the sqlite website that lists other programs, such as an odbc driver for use with sqlite? Is there a recommended odbc driver to use? You do not

Re: [sqlite] Changing table and security

2004-12-22 Thread Jay
> > > > > >You're altering tables you don't understand the structure of? > > > > > > > > > Think about a php forum... someone could choose to make a mod and add > a > column for the birthday in the users table... you can't know if > someone did it or not... Arg! Just invites people to crash

Re: [sqlite] Changing table and security

2004-12-22 Thread Paolo Vernazza
Jay wrote: --- Paolo Vernazza <[EMAIL PROTECTED]> wrote: Tell your friends that they need to read the FAQ. http://www.sqlite.org/faq.html#q13 Sorry, Richard, but I think that it isn't so simple you must also store triggers and indexes... and maybe you don't know what's the table

Re: [sqlite] Changing table and security

2004-12-22 Thread Christian Smith
On Tue, 21 Dec 2004, Paolo Vernazza wrote: >D. Richard Hipp wrote: > >> >> >> Tell your friends that they need to read the FAQ. >> http://www.sqlite.org/faq.html#q13 > >Sorry, Richard, but I think that it isn't so simple you must also >store triggers and indexes... and maybe you don't know

Re: [sqlite] What's the difference of "select * from tb" and "select "ID" from tb"?

2004-12-22 Thread Dennis Cote
CARIOTOGLOU MIKE wrote: > I can verify this : > > Select "columnName" from someTable gives columns with quoted names ! > ("ColumnName") instead of ColumnName > > This *feels* like a bug > I believe this is a bug as well. The following script demonstrates the problems using the sqlite3 shell. I

Re: [sqlite] Changing table and security

2004-12-22 Thread Dennis Cote
D. Richard Hipp wrote: > Before doing the "DELETE TABLE t1" you can run this query: > > SELECT sql FROM sqlite_master WHERE tbl_name!=name AND > tbl_name='t1'; > > That query will give you the complete text of all CREATE INDEX > and CREATE TRIGGER statements associated with table t1. Save >

Re: [sqlite] Changing table and security

2004-12-22 Thread Jay
> > You missed his point. When you use the steps in the FAQ to alter > > a table, one of the steps involves deleting it. When you do that > > SQLite also deletes all existing triggers and indices on the > > table. > > > > Consequently one piece of code that is simple (alter table) > suddenly

Re: [sqlite] Changing table and security

2004-12-22 Thread D. Richard Hipp
Roger Binns wrote: You're altering tables you don't understand the structure of? You missed his point. When you use the steps in the FAQ to alter a table, one of the steps involves deleting it. When you do that SQLite also deletes all existing triggers and indices on the table. Consequently

Re: [sqlite] Detecting if the db has changed

2004-12-22 Thread Roger Binns
If concurrent access is by instances of your program only, they can rendezvous via a private table. Yes, but that involves modifying every single code path that could update any of the many tables I use to update the private table. The counter Richard mentioned is matches exactly what my

Re: [sqlite] Changing table and security

2004-12-22 Thread Roger Binns
You're altering tables you don't understand the structure of? You missed his point. When you use the steps in the FAQ to alter a table, one of the steps involves deleting it. When you do that SQLite also deletes all existing triggers and indices on the table. Consequently one piece of code

Re: [sqlite] Changing table and security

2004-12-22 Thread Jay
--- Paolo Vernazza <[EMAIL PROTECTED]> wrote: > > Tell your friends that they need to read the FAQ. > > http://www.sqlite.org/faq.html#q13 > > Sorry, Richard, but I think that it isn't so simple you must also > > store triggers and indexes... and maybe you don't know what's the > table >

[sqlite] Bug in subselect

2004-12-22 Thread CARIOTOGLOU MIKE
This bug is a beauty: text column comparison in joins may follow NUMERIC rules, even if the column(s) have text affinity! consider this case. Tables A,B are a typical one-to-many relation, where B has N records for each A, and one field (key) relates them. CREATE TABLE a( key VARCHAR(2),

RE: [sqlite] What's the difference of "select * from tb" and "sel ect "ID" from tb"?

2004-12-22 Thread CARIOTOGLOU MIKE
I can verify this : Select "columnName" from someTable gives columns with quoted names ! ("ColumnName") instead of ColumnName This *feels* like a bug > -Original Message- > From: red forks [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 22, 2004 6:07 AM > To: [EMAIL PROTECTED]

[sqlite] ODBC Driver

2004-12-22 Thread Dan Keeley
Hi, I've finally got round to building sqlite. Now i'm after the odbc driver for it. Only thing is I can't seem to find the page on the sqlite website that lists other programs, such as an odbc driver for use with sqlite? Is there a recommended odbc driver to use? Rgds, Dan

Re: [sqlite] Detecting if the db has changed

2004-12-22 Thread Ng Pheng Siong
On Tue, Dec 21, 2004 at 07:58:46PM -0800, Roger Binns wrote: > Richard already answered. There is no mystery about who else is writing to > the db - it will be another instance of my program. If concurrent access is by instances of your program only, they can rendezvous via a private table.