Re: [sqlite] how to get result of eval as list of lists?

2005-01-23 Thread Stefan Finzel
Kurt Welgehausen wrote: proc lpartition {recsize data} { set ret {} set datalen [llength $data] for {set i 0; set j [expr {$recsize-1}]} \ {$i < $datalen} {incr i $recsize; incr j $recsize} { lappend ret [lrange $data $i $j] } set ret} So is there another way to determine the number of

[sqlite] Read only text widget

2005-01-23 Thread Anirban Sarkar
Hi all, I have a text widget which successfully fetches data from a backend sqlite database and displays it in the text widget. My requirement is that I want to make the text widget readonly so that no one can edit the fetched data. I use '-state disabled' but that hides the data that is displa

[sqlite] re: java jbdc test SOLVED

2005-01-23 Thread j-marvin
hi- i am going to write down everything i did today (if i can remember). i ran the test file and everything is ok. thanks, jim

Re: [sqlite] Case-Insensitive Searches

2005-01-23 Thread David Wheeler
On Jan 23, 2005, at 1:02 PM, D. Richard Hipp wrote: Use sqlite3_create_collation() to register a collating sequence that ignores case in UTF-8 characters. Then put "COLLATE " after the declaration of the column you want to be caseless. Thanks. This works for me in English, at least: sqlite> create

[sqlite] re: java jdbc test problems

2005-01-23 Thread j-marvin
hi- i am a little further along (i hope). C:\sqlite-2.8.15>make test MAKE Version 5.2 Copyright (c) 1987, 1998 Inprise Corp. "C:\Program Files\Java\jdk1.5.0_01"\bin\javac test.java C:\sqlite-2.8.15> and when i go to look at the file test there is a test.class file now as well as th

[sqlite] java sqlite problems with test

2005-01-23 Thread j-marvin
hi- i am attempting to learn java. i tried to install the sqlite jdbc and ran into these messages. can someone who knows java better (especially all the make and configuration stuff) offer some advice as to what might be going wrong? C:\sqlite-2.8.15>make test MAKE Version 5.2 Copyright (c)

Re: [sqlite] Determining the primary key of a table?

2005-01-23 Thread Will Leshner
On Sun, 23 Jan 2005 16:15:44 -0500, Ned Batchelder <[EMAIL PROTECTED]> wrote: > The pk column in the table_info pragma is populated, but as I said, the > index_list pragma doesn't mention an index. Woops. So you do. Sorry about that.

Re: [sqlite] how to get result of eval as list of lists?

2005-01-23 Thread Kurt Welgehausen
> Is there a fast way to get ... list of lists ... ? proc lpartition {recsize data} { set ret {} set datalen [llength $data] for {set i 0; set j [expr {$recsize-1}]} \ {$i < $datalen} {incr i $recsize; incr j $recsize} { lappend ret [lrange $data $i $j] } set ret } or for a fi

Re: [sqlite] few questions...

2005-01-23 Thread Andrew Piskorski
On Sun, Jan 23, 2005 at 11:11:54AM -0500, Jason Morehouse wrote: > We are currently using mysql. What is the comparison to opening a > database with sqlite vs connecting to the daemon with mysql? Our > current box has seen 300+ connections to the sql server at at once. Can > we expect that ha

RE: [sqlite] Determining the primary key of a table?

2005-01-23 Thread Ned Batchelder
The pk column in the table_info pragma is populated, but as I said, the index_list pragma doesn't mention an index. --Ned. http://nedbatchelder.com -Original Message- From: Will Leshner [mailto:[EMAIL PROTECTED] Sent: Sunday, January 23, 2005 3:34 PM To: sqlite-users@sqlite.org Subject:

Re: [sqlite] Case-Insensitive Searches

2005-01-23 Thread D. Richard Hipp
On Sun, 2005-01-23 at 10:17 -0800, David Wheeler wrote: > What's the best way to do case-insensitive searches in SQLite, given > that LOWER() may not work properly with UTF-8 characters? Is LOWER() > the best way in general, anyhow? And if so, will it use indexes? > Use sqlite3_create_collation

[sqlite] embedded TCL and sqlite in one app

2005-01-23 Thread Randall Fox
I have successfully embedded sqlite and tcl inside my application, which has a database open at all times. I use TCL as a "macro" language, so users can control the database. When processing a TCL script, I open a second copy of the same database file, run the script, then close the file. I am wo

Re: [sqlite] Determining the primary key of a table?

2005-01-23 Thread Will Leshner
On Sun, 23 Jan 2005 13:18:27 -0500, Ned Batchelder <[EMAIL PROTECTED]> wrote: > One more twist I just discovered: > > If the primary key is a single column that auto-increments, there is no > information in the pragma index_list about the primary key at all: Are you sure? I'm pretty sure I use th

Re: [sqlite] Version 3.1.0

2005-01-23 Thread sganz
The one aspect that I find usefull is for accessing a larger memory space. For example on your typical linux (rh9 32bit) you start to run out of mem (per process) at about 2gig. I can immediatly take the app an run on a 64bit machine and get at least an additional gig of ram from the allocators. Th

Re: [sqlite] Case-Insensitive Searches

2005-01-23 Thread Derrell . Lipman
David Wheeler <[EMAIL PROTECTED]> writes: > What's the best way to do case-insensitive searches in SQLite, given that > LOWER() may not work properly with UTF-8 characters? Is LOWER() the best way > in general, anyhow? And if so, will it use indexes? Function calls are not indexed in SQLite 2.8,

[sqlite] how to get result of eval as list of lists?

2005-01-23 Thread Stefan Finzel
Is there a fast way to get the result of a select as list of lists and not as a flat list? db1 eval {INSERT INTO t1 VALUES(1,'hello')} db1 eval {INSERT INTO t1 VALUES(2,'goodbye')} db1 eval {INSERT INTO t1 VALUES(3,'howdy!')} set x [db1 eval {SELECT * FROM t1}] Now i get a flat list: 1 hello 2 go

RE: [sqlite] Determining the primary key of a table?

2005-01-23 Thread Ned Batchelder
One more twist I just discovered: If the primary key is a single column that auto-increments, there is no information in the pragma index_list about the primary key at all: sqlite> create table foo(a int, b integer primary key, c int); sqlite> pramga table_info(foo); cid

[sqlite] Case-Insensitive Searches

2005-01-23 Thread David Wheeler
Hi All, Apologies for the newbie questions... What's the best way to do case-insensitive searches in SQLite, given that LOWER() may not work properly with UTF-8 characters? Is LOWER() the best way in general, anyhow? And if so, will it use indexes? Many TIA, David

[sqlite] Determining the primary key of a table?

2005-01-23 Thread Ned Batchelder
I need to examine the schema of a SQLite database programmatically. I've managed to find everything I need in the various pragmas for querying the schema, except: the order of the columns in the primary key. pragma table_info tells me which columns are in the primary key, but not their order i

Re: [sqlite] few questions...

2005-01-23 Thread bbum
On Jan 23, 2005, at 8:11 AM, Jason Morehouse wrote: We are currently using mysql. What is the comparison to opening a database with sqlite vs connecting to the daemon with mysql? Our current box has seen 300+ connections to the sql server at at once. Can we expect that having 300 databases ope

Re: [sqlite] few questions...

2005-01-23 Thread Clay Dowling
Jason Morehouse wrote: We are currently using mysql. What is the comparison to opening a database with sqlite vs connecting to the daemon with mysql? Our current box has seen 300+ connections to the sql server at at once. Can we expect that having 300 databases open with sqlite wont be a prob

[sqlite] few questions...

2005-01-23 Thread Jason Morehouse
Hello all, I've been playing around with sqlite for the past while, and am thinking of using it in a upcoming project. I have a few questions, if anyone is able to offer some insight. What happens when a database file is opened? Is the structure & indexes of all the tables read into memory? Is

RE: AW: [sqlite] sqlite3_column_tablename

2005-01-23 Thread mike cariotoglou
What do you want if the user types "SELECT (t0.x || t1.x) FROM table0, table1 ."? I would like to second that request. Ok, sure, there are cases where the info is meaningless (like above), and should be blank. But in most cases, it IS meaningful, and extremely useful for tools (not so much pe

Re: [sqlite] XML and SQLite?

2005-01-23 Thread Jeff
I think I have a clear idea of what to do now. Thanks. On Sat, 22 Jan 2005 23:56:48 -0800, Darren Duncan <[EMAIL PROTECTED]> wrote: > At 11:13 PM -0800 1/22/05, Jeff wrote: > >I'm making something that requires XML. (ooh, secretness) > >It would also be nice to use SQLite with it, but I am con