Re: [sqlite] Feature request, Prevent Master Journal file.

2008-03-18 Thread Richard Klein
Ken - You could write your own VFS that overrides the xOpen method so that it doesn't create a journal file. Quoting from the documentation: "The file I/O implementation can use the object type flags to change the way it deals with files. For example, an application that does not care about

Re: [sqlite] How to get the number of minutes

2008-03-18 Thread P Kishor
On 3/18/08, P Kishor <[EMAIL PROTECTED]> wrote: > On 3/18/08, Joanne Pham <[EMAIL PROTECTED]> wrote: > > Hi All > > I ran the following statement: > > select datetime(startTime *60, 'unixepoch','-8 hours') , bytesIn from > wanPerfTable where appId = 30 and remoteWXId = 200; > > and below

Re: [sqlite] How to get the number of minutes

2008-03-18 Thread P Kishor
On 3/18/08, Joanne Pham <[EMAIL PROTECTED]> wrote: > Hi All > I ran the following statement: > select datetime(startTime *60, 'unixepoch','-8 hours') , bytesIn from > wanPerfTable where appId = 30 and remoteWXId = 200; > and below is my output. > > 2007-12-03 11:00:00 20 > 2007-12-03

Re: [sqlite] How to get the minutes number only

2008-03-18 Thread Gerry Snyder
Joanne Pham wrote: > > > > > I would like to return only the number of minutes as below > The strftime function is your friend: http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions HTH, Gerry ___ sqlite-users mailing list

Re: [sqlite] How to get the minutes number only

2008-03-18 Thread drh
Joanne Pham <[EMAIL PROTECTED]> wrote: > Hi All > I ran the following statement: > select datetime(startTime *60, 'unixepoch','-8 hours') , bytesIn from > wanPerfTable where appId = 30 and remoteWXId = 200; > and below is my output. > > 2007-12-03 11:00:00 20 > 2007-12-03 11:01:00 5

Re: [sqlite] SQL logic error or missing database in version 3.5.6 (Bug???)

2008-03-18 Thread drh
"Steve Topov" <[EMAIL PROTECTED]> wrote: > Hello, > > Recently I upgraded SQLite to version 3.5.6 and discovered that my > program can’t work anymore with some database files. Sqlite3_open > returns OK, but when I am trying to execute any SQL statement it returns > “SQL logic error or missing

Re: [sqlite] SQLITE_CONSTRAINT error after sqlite3_step

2008-03-18 Thread Jay A. Kreibich
On Tue, Mar 18, 2008 at 04:06:04PM -0600, Dennis Cote scratched on the wall: > Vincent Vega wrote: > > query = sqlite3_mprintf("Insert into Inventory (Tag) values (?)"); > > This allocates memory and saves a pointer to it in query. My question is why use "sqlite3_mprintf()" at all? You're

Re: [sqlite] Last insert in a table

2008-03-18 Thread P Kishor
On 3/18/08, A.J.Millan <[EMAIL PROTECTED]> wrote: > From: "P Kishor" <[EMAIL PROTECTED]> > > > >> I would know if there a some way to know the last insert in a know > >> table. > >> > >> Some like the result returned by sqlite3_last_insert_rowid(), but > >> referred > >> to a specific

Re: [sqlite] Preventing Master Journal Files

2008-03-18 Thread John Stanton
Looks like Sqlite is not the right storage tool for your application since you don't want transactional integrity. How about something like Berkeley DB. Ken wrote: > Hello list, > > How do I prevent the creation of a journal file and a master journal file? I > need to be able to do this

[sqlite] How to get the number of minutes

2008-03-18 Thread Joanne Pham
Hi All I ran the following statement: select datetime(startTime *60, 'unixepoch','-8 hours') , bytesIn from wanPerfTable where appId = 30 and remoteWXId = 200; and below is my output. 2007-12-03 11:00:00 20 2007-12-03 11:01:00 5 2007-12-03 11:02:00 100 2007-12-03 11:03:00 50

Re: [sqlite] How to get the minutes number only

2008-03-18 Thread Joanne Pham
- Original Message From: Joanne Pham <[EMAIL PROTECTED]> To: General Discussion of SQLite Database Sent: Tuesday, March 18, 2008 4:40:54 PM Subject: How to get the minutes number only Hi All I ran the following statement: select datetime(startTime *60,

[sqlite] Feature request, Prevent Master Journal file.

2008-03-18 Thread Ken
Maybe this could be added as a "Feature request" to open_v2 ? Add, #define SQLITE_OPEN_OMIT_JOURNAL 0x8000 Test this flag and set the omit_journal parameter to Btree factory... To cause sqlite to omit journal creation. Obviously this has serious impact to a databases recoverability.

[sqlite] How to get the minutes number only

2008-03-18 Thread Joanne Pham
Hi All I ran the following statement: select datetime(startTime *60, 'unixepoch','-8 hours') , bytesIn from wanPerfTable where appId = 30 and remoteWXId = 200; and below is my output. 2007-12-03 11:00:00 20 2007-12-03 11:01:00 5 2007-12-03 11:02:00 100 2007-12-03 11:03:00

Re: [sqlite] Last insert in a table

2008-03-18 Thread Jay A. Kreibich
On Tue, Mar 18, 2008 at 08:07:12PM +0100, A.J.Millan scratched on the wall: > Hi all: > > I would know if there a some way to know the last insert in a know table. > > Some like the result returned by sqlite3_last_insert_rowid(), but referred > to a specific table inside the database

[sqlite] How to get the minutes number only

2008-03-18 Thread Joanne Pham
Hi All I ran the following statement: select datetime(startTime *60, 'unixepoch','-8 hours') , bytesIn from wanPerfTable where appId = 30 and remoteWXId = 200; and below is my output. 2007-12-03 11:00:00 20 2007-12-03 11:01:00 5 2007-12-03 11:02:00 100 2007-12-03 11:03:00 50

Re: [sqlite] Last insert in a table

2008-03-18 Thread A.J.Millan
From: "P Kishor" <[EMAIL PROTECTED]> >> I would know if there a some way to know the last insert in a know >> table. >> >> Some like the result returned by sqlite3_last_insert_rowid(), but >> referred >> to a specific table inside the database connection, and not in all >> tables >> into

Re: [sqlite] Last insert in a table

2008-03-18 Thread Dennis Cote
A.J.Millan wrote: > > I would know if there a some way to know the last insert in a know table. > > Some like the result returned by sqlite3_last_insert_rowid(), but referred > to a specific table inside the database connection, and not in all tables > into the database from the database

Re: [sqlite] How to decode a date

2008-03-18 Thread Dennis Cote
[EMAIL PROTECTED] wrote: > > I would like to know how to decode a Date when I read a table. The same > question for Time. > See http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions for details. HTH Dennis Cote ___ sqlite-users mailing list

Re: [sqlite] Preventing Master Journal Files

2008-03-18 Thread Dennis Cote
Ken wrote: > Hello list, > > How do I prevent the creation of a journal file and a master journal > file? I need to be able to do this dynamically not just a compile > time flag. > I don't think you can do this. A journal file is always created except for in memory databases. You can change

Re: [sqlite] SQLITE_CONSTRAINT error after sqlite3_step

2008-03-18 Thread Dennis Cote
Vincent Vega wrote: > Well , since I do need to avoid a case where duplicated tags are > inserted ,I have added a treatment to the case of SQLITE_CONSTRAINT. OK, but what you have shown doesn't do anything useful. If your Tag values must really be unique, then it is an error to insert a

Re: [sqlite] Last insert in a table

2008-03-18 Thread P Kishor
On 3/18/08, A.J.Millan <[EMAIL PROTECTED]> wrote: > Hi all: > > I would know if there a some way to know the last insert in a know table. > > Some like the result returned by sqlite3_last_insert_rowid(), but referred > to a specific table inside the database connection, and not in all tables >

Re: [sqlite] How to decode a date

2008-03-18 Thread Scott Baker
[EMAIL PROTECTED] wrote: > Hello, > > I would like to know how to decode a Date when I read a table. The same > question for Time. The wiki on this question is quite good (and not just because I editted some of it). http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions -- Scott Baker -

Re: [sqlite] How to decode a date, I found the answer !

2008-03-18 Thread Michel . Rodrigue
> -Message d'origine- > De : Rodrigue, Michel (TIT-SA) > Envoyé : 2008-03-18 14:49 > À : 'sqlite-users@sqlite.org' > Objet : How to decode a date > > Hello, > > I would like to know how to decode a Date when I read a table. The same > question for Time. > > Thank you

[sqlite] Last insert in a table

2008-03-18 Thread A.J.Millan
Hi all: I would know if there a some way to know the last insert in a know table. Some like the result returned by sqlite3_last_insert_rowid(), but referred to a specific table inside the database connection, and not in all tables into the database from the database connection. Thanks in

[sqlite] How to decode a date

2008-03-18 Thread Michel . Rodrigue
Hello, I would like to know how to decode a Date when I read a table. The same question for Time. Thank you very much. __ Michel Rodrigue, B.Sc.A. Conseiller en systèmes d'information Ville de Québec

Re: [sqlite] Malformed database schema with SQLite version > 3.5.x

2008-03-18 Thread drh
MarcoN <[EMAIL PROTECTED]> wrote: > Yes, of course I can send you the DB: the file is under 1MB, about 100K if > compressed via .zip > Can I send it to you via e-mail? > Thanks very much for the support > Please send the database directly to my email address shown below. -- D. Richard Hipp

[sqlite] Preventing Master Journal Files

2008-03-18 Thread Ken
Hello list, How do I prevent the creation of a journal file and a master journal file? I need to be able to do this dynamically not just a compile time flag. The process does not need recovery as it is an all or none for some of the DB's it creates. And is restarted from the beginning in the

Re: [sqlite] algorithm for adding columns to a table

2008-03-18 Thread Virgilio Alexandre Fornazin
Yes. I did this in my custom version of SQLite. If statement is ALTER TABLE, and SQLite returns error, I check if it´s ALTER TABLE (t) MODIFY COLUMN ou DROP COLUMN, doing the exact flow you did. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derrell

[sqlite] Preventing Master Journal Files.

2008-03-18 Thread Ken
How do I prevent the creation of a journal file and a master journal file? The process does not need recovery as it is an all or none. And is restarted from the beginning in the event of a crash. Thanks, Ken ___ sqlite-users mailing list

Re: [sqlite] Malformed database schema with SQLite version > 3.5.x

2008-03-18 Thread MarcoN
Yes, of course I can send you the DB: the file is under 1MB, about 100K if compressed via .zip Can I send it to you via e-mail? Thanks very much for the support On Tue, Mar 18, 2008 at 1:10 PM, <[EMAIL PROTECTED]> wrote: > MarcoN <[EMAIL PROTECTED]> wrote: > > I actually don't know how to export

Re: [sqlite] Malformed database schema with SQLite version > 3.5.x

2008-03-18 Thread Marco NOVARO
Yes, of course I can send you the DB: the file is under 1MB, about 100K if compressed via .zip Can I send it to you via e-mail? Thanks very much for the support ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] SQLITE_CONSTRAINT error after sqlite3_step

2008-03-18 Thread Vincent Vega
Well , since I do need to avoid a case where duplicated tags are inserted ,I have added a treatment to the case of SQLITE_CONSTRAINT. I am just curious whether I need to call sqlite3_finalize(Statement) after sqlite3_step(Statement) returns SQLITE_CONSTRAINT so that the memory that was

[sqlite] algorithm for adding columns to a table

2008-03-18 Thread Derrell Lipman
I could use another set of eyes or three to verify that this algorithm makes sense. I have legacy sqlite2 databases for which I need a generic function to add columns to tables. This is the pseudocode for the function. Am I missing anything? In this pseudocode, the parameters are:

Re: [sqlite] Malformed database schema with SQLite version > 3.5.x

2008-03-18 Thread drh
MarcoN <[EMAIL PROTECTED]> wrote: > I actually don't know how to export it, because "SQLite Database browser" > (that is able to open the database and execute the query) has no way to > export it; SQLiteSpy will not open the database because it is compiled with > a new SQLIte library version >

Re: [sqlite] Malformed database schema with SQLite version > 3.5.x

2008-03-18 Thread MarcoN
I actually don't know how to export it, because "SQLite Database browser" (that is able to open the database and execute the query) has no way to export it; SQLiteSpy will not open the database because it is compiled with a new SQLIte library version Maybe I can try to find an older version of

Re: [sqlite] newB question; c++ and sqlite3; how2 check if word exist in the table

2008-03-18 Thread vl.pavlov
it works fine! * This is what I thought you wanted. Using your table and column names my previous suggestion becomes: insert into tbl1 select 'seaside' where not exists (select words from tbl2 where words = 'seaside') The subselect will determine if the word is

Re: [sqlite] Database Table corrupt in SQLite v 3.4.0

2008-03-18 Thread Bharath Booshan L
> Do you test for SQLITE_BUSY, when you perform BEGIN IMMEDIATE ? > Yes, I do. > Yes a process that is reading will continue to read. Once it completes if > anothre process is waiting to write then the additional read locks will not be > granted. This is to prevent writer starvation. > > How

Re: [sqlite] Database Table corrupt in SQLite v 3.4.0

2008-03-18 Thread Bharath Booshan L
> Where do the and come from? > Where do the and come from? > Where does all the data to create the new records come from? You say > Process A only has a FilePath as input. > Where do the and come from? > All the Information written into the database is extracted from the file itself.