[sqlite] How sqlite will store the data?

2009-05-15 Thread Pramoda M. A
Hi All, In which order, SQLite will store the data? I am using SQLite 3.6.5 and which is storing data in some other manner than I am inserting? How to make it to store in the same way as insertion? Please anybody help me. With Regards Pramoda.M.A

Re: [sqlite] How sqlite will store the data?

2009-05-15 Thread Michael Schlenker
Pramoda M. A schrieb: > In which order, SQLite will store the data? In any order it likes, it might use the insertion order if thats convenient. > > I am using SQLite 3.6.5 and which is storing data in some other manner > than I am inserting? > > How to make it to store in the same way as

Re: [sqlite] How sqlite will store the data?

2009-05-15 Thread Pramoda M. A
But how to get the rows in the same order of insertion? Say, I will insert 2 3 4 and it will store in 2 4 3. But I need in the order 2 3 4. Is it possible? -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Michael Schlenker

Re: [sqlite] How sqlite will store the data?

2009-05-15 Thread Igor Tandetnik
"Pramoda M. A" wrote in message news:f7846b8f3c78c049b6a1dff861f6c16f03e94...@kcinblrexb01.kpit.com > But how to get the rows in the same order of insertion? > Say, I will insert 2 3 4 and it will store in 2 4 3. But I need in > the order 2 3 4. Is it possible? You

Re: [sqlite] How sqlite will store the data?

2009-05-15 Thread John Machin
On 15/05/2009 8:41 PM, Pramoda M. A wrote: > But how to get the rows in the same order of insertion? > Say, I will insert 2 3 4 and it will store in 2 4 3. But I need in the order > 2 3 4. Is it possible? Possibility (1): Unless you use INTEGER PRIMARY KEY and supply your own values for the key

Re: [sqlite] SQLl question

2009-05-15 Thread Patty Lindsay
Try select n.name, p.type, p.addr from p join name on p.id = n.id union select n.name, e.type, e.addr from e join name on e.id = n.id Patty On Fri, May 15, 2009 at 12:14 AM, Evan Burkitt wrote: > This isn't a Sqlite question per se, but I know there are some SQL gurus

[sqlite] About Time Field

2009-05-15 Thread Hughman
Hi, I create a table with a field of datatype Time, and when I insert a formatting string like 'HHMMSS' into it , the first number 0 always be trimed . I want to keep it, how should I do? For exampe, '081220' will be converted into '81220'. Say goodbye to

Re: [sqlite] About Time Field

2009-05-15 Thread Igor Tandetnik
"Hughman" wrote in message news:f1a32add0905150528r3bc74b2epd7ab93539ac68...@mail.gmail.com > I create a table with a field of datatype Time There is no Time type in SQLite. For more details, see http://sqlite.org/datatype3.html > and when I insert a > formatting string like

[sqlite] CURRENT_TIMESTAMP precision

2009-05-15 Thread Sam Carleton
I would like CURRENT_TIMESTAMP to be more accurate than just one second, any suggestions on how I might do that once? My solution is all a C/C++ interface, so all features are open to me. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] About Time Field

2009-05-15 Thread Hughman
Thanks. > There is no Time type in SQLite. Oops... I use Sqlite Administrator to create a table , and the datatypes are almost as many as MySQL , such as Date, Time, TimeStamp, varchar. Since sqlite only has 5 kinds of datatype, why doesn't it throw a error message when I create a table with a

[sqlite] Corrupt Database Problems

2009-05-15 Thread Kevin Gale
Hi. We are using SQLite 3.3.6 via Realbasic & the REALSQLDatabase plug-in. Over the past few weeks we have had calls from different customers stating that the documents that they have been saving from our application (a sqlite database) are now empty. I have received the database from the

Re: [sqlite] CURRENT_TIMESTAMP precision

2009-05-15 Thread Doug Currie
On May 15, 2009, at 9:07 AM, Sam Carleton wrote: > I would like CURRENT_TIMESTAMP to be more accurate than just one > second, any suggestions on how I might do that once? My solution is > all a C/C++ interface, so all features are open to me. Option 1 - use: julianday('now') instead of

[sqlite] SQLite spawns multiple processes?

2009-05-15 Thread jkimble
I'm running a embedded SQL C application (SQLite v3.6.13) on an embedded platform (Coldfire) running Linux 2.6.25 kernel. Something odd I've noticed is that when my application reaches the point of calling dbopen it spawns a new process, with the same name as my application, so that the process

Re: [sqlite] CURRENT_TIMESTAMP precision

2009-05-15 Thread Eric Minbiole
> I would like CURRENT_TIMESTAMP to be more accurate than just one second, > any suggestions on how I might do that once? My solution is all a C/C++ > interface, so all features are open to me. One option would be to create and register a custom SQL function that returned the current time,

Re: [sqlite] CURRENT_TIMESTAMP precision

2009-05-15 Thread Eric Minbiole
Please ignore my previous post. Doug's suggestion is much better. ~Eric Eric Minbiole wrote: >> I would like CURRENT_TIMESTAMP to be more accurate than just one second, >> any suggestions on how I might do that once? My solution is all a C/C++ >> interface, so all features are open to me. >

Re: [sqlite] About Time Field

2009-05-15 Thread Igor Tandetnik
Hughman wrote: >> There is no Time type in SQLite. > > Oops... I use Sqlite Administrator to create a table , and the > datatypes are > almost as many as MySQL , such as Date, Time, TimeStamp, varchar. > Since sqlite only has 5 kinds of datatype, why doesn't it throw a > error

Re: [sqlite] About Time Field

2009-05-15 Thread cmartin
On Fri, 15 May 2009, Hughman wrote: >> There is no Time type in SQLite. > > Oops... I use Sqlite Administrator to create a table , and the datatypes are > almost as many as MySQL , such as Date, Time, TimeStamp, varchar. > Since sqlite only has 5 kinds of datatype, why doesn't it throw a error >

Re: [sqlite] Corrupt Database Problems

2009-05-15 Thread Jim Wilcoxson
I think you have answered your own question. If you use synchronous=off, you are saying "I don't care much about this database." When you "save" documents, you are merely putting them in a computer's cache (memory) and then confirming to the user that they are on the hard drive, when they aren't

Re: [sqlite] SQLite spawns multiple processes?

2009-05-15 Thread Ken
not sure really... But threading in linux will show two processes when a thread is created. Can you run strace and see if clone is called at thread creation? Check your threading package and verify its internal operations. Newer versions do not show duplicate process. But older versions do.

Re: [sqlite] SQLite spawns multiple processes?

2009-05-15 Thread Logan.Ratner
I don't know what causes it, but I see the exact same thing running an embedded 2.6.17 kernel on a PPC architecture. And my application is decidedly single-threaded. Oddly enough, the exact same application running on multiple 2.6 kernels running on i86 machines does not show this behavior. For

Re: [sqlite] SQLite spawns multiple processes?

2009-05-15 Thread D. Richard Hipp
On May 15, 2009, at 1:21 PM, wrote: > I don't know what causes it, but I see the exact same thing running an > embedded 2.6.17 kernel on a PPC architecture. And my application is > decidedly single-threaded. Oddly enough, the exact same

Re: [sqlite] SQLl question

2009-05-15 Thread Evan Burkitt
On 05/15/2009 03:41, Dennis Cote wrote: > > Your database would be simpler if you simply combined these two tables > into a single table in the first place. It would eliminate the need to > combine them for this type of query. The tables already have a type > field to distinguish the email

Re: [sqlite] SQLite spawns multiple processes?

2009-05-15 Thread Logan.Ratner
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of D. Richard Hipp > Sent: Friday, May 15, 2009 1:03 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] SQLite spawns multiple processes? > > > On May

[sqlite] Use the result of a query, as a variable name in another query ?

2009-05-15 Thread Stef Mientki
hello, to test complex queries, I want to use the command line utility ( or an equivalent that remembers what I type). Now I've a table which contains the names of a set of other tables. In Python I can easily create the SQL string (containing the field name) and commit it to the database. Is

Re: [sqlite] SQL logic error or missing database

2009-05-15 Thread Alex Ousherovitch
>> At the end of the loop, instead of having 4000 rows I have 3976 rows >> (it's random, sometimes I have 3972 or 3974). >> sqlite3_exec doesn't returns any error during the INSERT statement, >> but I have some errors during the BEGIN IMMEDIATE, errors are all: >> SQL logic error or missing

Re: [sqlite] SQL logic error or missing database

2009-05-15 Thread Igor Tandetnik
Alex Ousherovitch wrote: > Is it safe to use sqlite3_errmsg() when each thread is using its own > connection handle Yes. Each connection allocates its own memory for this string. Igor Tandetnik ___ sqlite-users

Re: [sqlite] About Time Field

2009-05-15 Thread John Stanton
Sqlite does not have a TIME type.. It is interpreting your time as an integer or floating point number or maybe text, depending upon its format. Hughman wrote: > Hi, > > I create a table with a field of datatype Time, and when I insert a > formatting string like 'HHMMSS' into it , the first

Re: [sqlite] Use the result of a query, as a variable name in another query ?

2009-05-15 Thread Florian Nigsch
Hey, I don't know if this works in SQLite the same way, but in MySQL you can do it like this: http://dev.mysql.com/doc/refman/5.0/en/user-variables.html (Basically "prepare" an SQL statement from a string) Best, Flo On 15 May 2009, at 16:30, Stef Mientki wrote: > hello, > > to test

Re: [sqlite] Corrupt Database Problems

2009-05-15 Thread John Machin
On 16/05/2009 3:08 AM, Jim Wilcoxson wrote: > I think you have answered your own question. If you use > synchronous=off, you are saying "I don't care much about this > database." When you "save" documents, you are merely putting them in > a computer's cache (memory) and then confirming to the

[sqlite] Accessing sqlite3 through javascript.

2009-05-15 Thread Saurabh Pawar
I have been using sqlite3 for my engine based programs and now would like to use it for my web based applications which are completely based on html and javascript. So I would like to have some information if available on how to connect to sqlite database through javascript and access the

Re: [sqlite] Accessing sqlite3 through javascript.

2009-05-15 Thread P Kishor
On Sat, May 16, 2009 at 5:45 AM, Saurabh Pawar wrote: > > I have been using sqlite3 for my engine based programs and now would like to > use it for my web based applications which are completely based on html and > javascript. So I would like to have some information if

Re: [sqlite] Accessing sqlite3 through javascript.

2009-05-15 Thread Igor Tandetnik
"Saurabh Pawar" wrote in message news:240022.95142...@web95016.mail.in2.yahoo.com > So I would like to have some > information if available on how to connect to sqlite database through > javascript and access the same. http://gears.google.com/ Igor Tandetnik

Re: [sqlite] Accessing sqlite3 through javascript.

2009-05-15 Thread P Kishor
On Sat, May 16, 2009 at 6:19 AM, Igor Tandetnik wrote: > "Saurabh Pawar" > wrote in message news:240022.95142...@web95016.mail.in2.yahoo.com >> So I would like to have some >> information if available on how to connect to sqlite database through >>