[sqlite] disk I/O error

2007-06-05 Thread Arun Bhalla
Hello, This message may be off-topic in that I don't think the following issue corresponds to a bug with SQLite, but it's something I've discovered while using SQLite. Perhaps someone on the list has had a similar experience or could make a suggestion. A Linux 2.6/x86_64 system reports a

Re: [sqlite] Stack usage

2007-06-05 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > My application's doesn't create any databases itself. It allows users to > store any data. And users need to be able to store any number of columns in > 1 table (the most I'v heard about is about 1, but I wouldn't be > surprised if they had more). Trust me,

Re: [sqlite] Stack usage

2007-06-05 Thread Eduardo Morras
At 20:31 05/06/2007, you wrote: > Excuse me for make this question but have you > normalized your database? Try to design/define it in at least 3NormalForm. My application's doesn't create any databases itself. It allows users to store any data. And users need to be able to store any

RE: [sqlite] Sorted index

2007-06-05 Thread Tom Briggs
When querying the table be sure to put the indexed column(s) in the ORDER BY clause though - otherwise the index won't do you any good. :) -T > -Original Message- > From: John Stanton [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 05, 2007 9:20 AM > To: sqlite-users@sqlite.org

Re: [sqlite] Why does "SELECT julianday('some_date') AS dateNumber" get me a string via ODBC?

2007-06-05 Thread Trey Mack
I see that it is a variant of type VT_BSTR containing "2345678.9123" (or whatever), and I have to use strtod() to convert it to the number I want. Is there a way to write the query to ensure that it will give me a number instead of a string? The type selection is done in your ODBC wrapper, and

[sqlite] Re: Re: Newbie - can't create database but I can attach

2007-06-05 Thread Igor Tandetnik
nvi-yMULe1UMIukeIZ0/[EMAIL PROTECTED] wrote: I wasn't specific enough, here's what's happening in my DOS window... SQLite version 3.3.17 Enter ".help" for instructions sqlite> sqlite3 testdatabase //hard return That's not how it works. "sqlite3 testdatabase" is supposed to be run from DOS

Re: [sqlite] Re: Newbie - can't create database but I can attach

2007-06-05 Thread nvi
Thank you Igor, I appreciate your time! I wasn't specific enough, here's what's happening in my DOS window... --- SQLite version 3.3.17 Enter ".help" for instructions sqlite> sqlite3 testdatabase //hard return ...> ; //hard return SQL error: near "sqlite3": syntax error sqlite> --- I was

Re: [sqlite] Why does "SELECT julianday('some_date') AS dateNumber" get me a string via ODBC?

2007-06-05 Thread Omar Eljumaily
I believe ODBC will do type conversions for you. If not, use sscanf. All sqlite data is stored as strings, I believe, anyway, so there's lots of type conversion going whether it's explicit or not. Representing dates as floating point numbers can be tricky because of subtle rounding issues,

[sqlite] Why does "SELECT julianday('some_date') AS dateNumber" get me a string via ODBC?

2007-06-05 Thread Rob Richardson
Greetings! I am trying to talk to a small SQLite database through ADO and an ODBC driver. I want to convert a date to a Julian day before using the date in a query of a table that could have over a million records. In SQliteSpy, the query "SELECT julianday('2007-06-05 12:34:56', 'localtime')

Re: [sqlite] Stack usage

2007-06-05 Thread BardzoTajneKonto
> Excuse me for make this question but have you > normalized your database? Try to design/define it in at least 3NormalForm. My application's doesn't create any databases itself. It allows users to store any data. And users need to be able to store any number of columns in 1 table (the

Re: [sqlite] Stack usage

2007-06-05 Thread Eduardo Morras
At 16:40 05/06/2007, you wrote: Joe Wilson napisa³(a): > Please respond to the mailing list in the future. Sorry. Different client. I didn't notice the adress. > At least theres a known workaround, so no problem. Workaround is not a solution. > > > > hence your problem. > > > > Sure it is.

[sqlite] Re: Newbie - can't create database but I can attach

2007-06-05 Thread Igor Tandetnik
nvi-yMULe1UMIukeIZ0/[EMAIL PROTECTED] wrote: Hello, thanks in advance, I've tried to answer this through extensive searching. The following syntax does not create a database, e.g.; sqlite> sqlite3 testdatabase SQLite defers creating the database file until you create the first table.

Re: [sqlite] Newbie - can't create database but I can attach

2007-06-05 Thread nvi
Hello, thanks in advance, I've tried to answer this through extensive searching. The following syntax does not create a database, e.g.; sqlite> sqlite3 testdatabase However, if I create a sqlite database with TkSQLite, sqlite.exe can 'attach' to that test database, and, using the sqlite.exe

Re: [sqlite] Does Attach improve Concurrency ?

2007-06-05 Thread BardzoTajneKonto
> >> Does > >> using separate databases and attaching them improve concurrency (by > >> providing finer-grained locking)? > > > > Yes it does. You can open a connection to a memory database, store each > table > > in a separate database and attach them if needed. I'v already changed > > sqlite

Re: [sqlite] Does Attach improve Concurrency ?

2007-06-05 Thread Christian Smith
Eduardo Morras uttered: At 19:32 01/06/2007, you wrote: When you have a connection with multiple attached databases and the connection acquires an exclusive lock, does it always lock all attached databases or does it keep track of which databases require the lock? Does using separate

Re: [sqlite] Does Attach improve Concurrency ?

2007-06-05 Thread Christian Smith
[EMAIL PROTECTED] uttered: When you have a connection with multiple attached databases and the connection acquires an exclusive lock, does it always lock all attached databases or does it keep track of which databases require the lock? 1st process: C:\Documents and

Re: [sqlite] Stack usage

2007-06-05 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > Joe Wilson napisa³(a): > > Please respond to the mailing list in the future. > > Sorry. Different client. I didn't notice the adress. > > > At least there's a known workaround, so no problem. > > Workaround is not a solution. Increasing the stack will fix your

Re: [sqlite] Stack usage

2007-06-05 Thread Nuno Lucas
On 05 Jun 2007 16:40:32 +0200, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Joe Wilson napisał(a): > At least theres a known workaround, so no problem. Workaround is not a solution. For an embedded (and lite) SQL engine like SQLite, you have to bear in mind some features will never be

Re: [sqlite] Stack usage

2007-06-05 Thread BardzoTajneKonto
Joe Wilson napisał(a): > Please respond to the mailing list in the future. Sorry. Different client. I didn't notice the adress. > At least theres a known workaround, so no problem. Workaround is not a solution. > > > > hence your problem. > > > > Sure it is. Just like any bug or missing

Re: [sqlite] Stack usage

2007-06-05 Thread Joe Wilson
Such a statement would never be issued on a low memory device. This is an exceptional case involving a select with 2000 unions - I would not worry about it. --- [EMAIL PROTECTED] wrote: > This is very worrying since it means that the statement cannot be compiled on > a > low memory device. > I

Re: [sqlite] Stack usage

2007-06-05 Thread Jonas Sandman
Is it wise to have a database with 2000 columns? Wouldn't it be better to split this into several tables and query them separately? Jonas On 6/5/07, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: This is very worrying since it means that the statement cannot be compiled on a low memory

Re: [sqlite] Stack usage

2007-06-05 Thread Clive . Bluston
This is very worrying since it means that the statement cannot be compiled on a low memory device. I am new to Sqlite, but I would guess that a precompiled query could be used, where memory is low and I also suppose that variable values could be bound to that precompiled query. Clive

Re: Re: [sqlite] Stack usage

2007-06-05 Thread Nuno Lucas
On 05 Jun 2007 14:59:40 +0200, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Are you sure it is sqlite that used the stack and not the jdbc driver > (or your application)? yes > What happens if you run that query from the sqlite shell? That query I pasted works. Bigger doesn't. Ok, I

[sqlite] Re: baffled by dates

2007-06-05 Thread Chris Fonnesbeck
Thanks to everyone for their help and advice. I think I get it now. Cheers, cf On 6/4/07, Chris Fonnesbeck <[EMAIL PROTECTED]> wrote: I'm at a complete loss about how to work with dates in SQLite. The documentation doesnt seem to be helping me. I have a table with some date fields, in the

Re: [sqlite] Sorted index

2007-06-05 Thread John Stanton
B-Tree indices are in sorted sequence. Just raise an index on the column. [EMAIL PROTECTED] wrote: I would like to maintain a sorted list of ~3000 entries. I know that I can create a table and the SELECT from it with the ORDER BY clause in order to sort it. However I do not want the overhead

Re: [sqlite] Stack usage

2007-06-05 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: > I'v read in change log that some stack allocted memory were moved to the > heap, but I think that > there is still to much allocated memory on the stack. > After creating a table with 2000 columns, jdbc driver created a query that > run out of stack. > Default

Re: [sqlite] Stack usage

2007-06-05 Thread Nuno Lucas
On 05 Jun 2007 13:35:33 +0200, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I'v read in change log that some stack allocted memory were moved to the heap, but I think that there is still to much allocated memory on the stack. After creating a table with 2000 columns, jdbc driver created a query

[sqlite] Re: Sorted index

2007-06-05 Thread Igor Tandetnik
Clive.Bluston-cPKiotmf5pXN/[EMAIL PROTECTED] wrote: I would like to maintain a sorted list of ~3000 entries. I know that I can create a table and the SELECT from it with the ORDER BY clause in order to sort it. However I do not want the overhead of doing this after adding a new entry. It

[sqlite] Stack usage

2007-06-05 Thread BardzoTajneKonto
I'v read in change log that some stack allocted memory were moved to the heap, but I think that there is still to much allocated memory on the stack. After creating a table with 2000 columns, jdbc driver created a query that run out of stack. Default java's stack limit is low, but it wasn't hard

RE: [sqlite] Copying the content of a table to another table

2007-06-05 Thread Kirrthana M
Thanks i ll check it out.. -Original Message- From: Lloyd [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 1:37 PM To: Kirrthana M Cc: sqlite-users@sqlite.org Subject: Re: [sqlite] Copying the content of a table to another table create table x(c1 number,c2 number); create table

Re: [sqlite] baffled by dates

2007-06-05 Thread P Kishor
On 6/5/07, John Stanton <[EMAIL PROTECTED]> wrote: OK Sqlite doesn't have a date type, period. Just as it doesn't have other types, but don't let it it stop you from using dates very successfully with Sqlite by defining a date type and using the functionally built into the product. Indeed.

[sqlite] Sorted index

2007-06-05 Thread Clive . Bluston
I would like to maintain a sorted list of ~3000 entries. I know that I can create a table and the SELECT from it with the ORDER BY clause in order to sort it. However I do not want the overhead of doing this after adding a new entry. It would be good if I could create an index that was sorted,

Re: [sqlite] Copying the content of a table to another table

2007-06-05 Thread Lloyd
create table x(c1 number,c2 number); create table y(v1 number,v2 number,v3 number,v4 number); insert into y (v1,v2) select c1,c2 from x; or better you can use the alter table command on your old table (here x) alter table x add v3 number; alter table x add v4 number; the following way

RE: [sqlite] Re: How to retrieve results in a array?

2007-06-05 Thread B V, Phanisekhar
You can use sqlite3_get_table. This will internally step through each row. Regards, Phani -Original Message- From: Dave Furey [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 23, 2007 4:52 AM To: sqlite-users@sqlite.org Subject: RE: [sqlite] Re: How to retrieve results in a array? Ok,