Re: [sqlite] [Windows] Application to let end-users handle records?

2010-05-17 Thread Matt Young
I have that problem. A solution is an ultra lite SQLite window to play along side existing spread sheet packages. Then just get read and write to the spreadsheet happening. I did that simply with R; I reasoned Windows was smart enough to handle files, so I just read and write files netween

Re: [sqlite] OperationalError: no such function: group_concat

2010-05-17 Thread P Kishor
On Tue, May 18, 2010 at 12:00 AM, zeal wrote: > my sqlite3 version is 2.3.2 > is it out of date? yes. > which version should i install? > the latest. .. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] OperationalError: no such function: group_concat

2010-05-17 Thread zeal
my sqlite3 version is 2.3.2 is it out of date? which version should i install? -- From: "Jay A. Kreibich" Sent: Tuesday, May 18, 2010 12:30 PM To: "General Discussion of SQLite Database" Subject: Re:

Re: [sqlite] sqlite3_prepare_v2 && SQLITE_BUSY

2010-05-17 Thread Dan Kennedy
On May 18, 2010, at 10:18 AM, Sam Carleton wrote: > For those of you following along my life (which I hope none of you > are), I > am working on cleaning up my code to handle SQLITE_BUSY correctly. > The > first issue I think I just successfully overcame was how to lock the > DB to > get

Re: [sqlite] OperationalError: no such function: group_concat

2010-05-17 Thread Jay A. Kreibich
On Tue, May 18, 2010 at 10:31:55AM +0800, zeal scratched on the wall: > Dear sqlite user group, > >i just run a sqlstmt like: > >>> conn=sqlite3.connect("c:/tmp/tree_db.txt") > >>> conn.execute("select rdn, group_concat(child_rdn) as child from cm_tree > >>> group by rdn") > Traceback (most

[sqlite] sqlite3_prepare_v2 && SQLITE_BUSY

2010-05-17 Thread Sam Carleton
For those of you following along my life (which I hope none of you are), I am working on cleaning up my code to handle SQLITE_BUSY correctly. The first issue I think I just successfully overcame was how to lock the DB to get my code to return a SQLITE_BUSY. What I did was use the Firebird plugin

Re: [sqlite] OperationalError: no such function: group_concat

2010-05-17 Thread Igor Tandetnik
zeal wrote: > Dear sqlite user group, > > i just run a sqlstmt like: conn=sqlite3.connect("c:/tmp/tree_db.txt") conn.execute("select rdn, group_concat(child_rdn) as child from cm_tree group by rdn") > Traceback (most recent call last): > File "", line 1,

[sqlite] OperationalError: no such function: group_concat

2010-05-17 Thread zeal
Dear sqlite user group, i just run a sqlstmt like: >>> conn=sqlite3.connect("c:/tmp/tree_db.txt") >>> conn.execute("select rdn, group_concat(child_rdn) as child from cm_tree >>> group by rdn") Traceback (most recent call last): File "", line 1, in OperationalError: no such function:

Re: [sqlite] Force the use of the _v2 functions

2010-05-17 Thread Sam Carleton
Simon, No, I did not mean that all the v1 function folks should upgrade to v2, but that there be a macro for those that are not and don't want to use v1 functions. If the macro isn't defined, then all is as it is now. I could do it myself, but every time I updated source I would have to update

Re: [sqlite] Force the use of the _v2 functions

2010-05-17 Thread Simon Slavin
On 18 May 2010, at 3:06am, Sam Carleton wrote: > I just looked through the header file and it looks like there is no macro to > focus the use of the newer _v2 functions. What is the reasoning behind > that? Personally I would love to set a macro which would simply eliminate > the older

[sqlite] Force the use of the _v2 functions

2010-05-17 Thread Sam Carleton
I just looked through the header file and it looks like there is no macro to focus the use of the newer _v2 functions. What is the reasoning behind that? Personally I would love to set a macro which would simply eliminate the older functions so that I don't use them inadvertently. Sam

[sqlite] FW: recursive select in sqlite

2010-05-17 Thread Simon Hax
Oracle knows a clause called " connect by ..." where you can have "parent"-nodes and "siblings" and so on to construct hierarchical e.g. part lists My understanding is that sqlite does not support this. S. -Ursprüngliche Nachricht- Von: zeal Gesendet: 17.05.2010

Re: [sqlite] read only databases and in-memory databases

2010-05-17 Thread Simon Slavin
On 17 May 2010, at 9:46pm, Sam Carleton wrote: > On Mon, May 17, 2010 at 2:27 PM, Black, Michael (IS) > wrote: > >> Not rude -- just a communications problem... >> >> There's a difference between read-only and exclusive. >> >> Read-only just means you can't do inserts

Re: [sqlite] read only databases and in-memory databases

2010-05-17 Thread Sam Carleton
On Mon, May 17, 2010 at 2:27 PM, Black, Michael (IS) wrote: > Not rude -- just a communications problem... > > There's a difference between read-only and exclusive. > > Read-only just means you can't do inserts and creates. It's not the write > mode of the database that

Re: [sqlite] [Windows] Application to let end-users handle records?

2010-05-17 Thread Olaf Schmidt
"Gilles Ganault" schrieb im Newsbeitrag news:uk03v5h4ovo8un5hq68ldbotuf1fujr...@4ax.com... > On Mon, 17 May 2010 18:59:36 +0200, "Olaf Schmidt" > wrote: > >I'd say, what you're looking for (in case a "softer" migration > >of Excel-VBA-Devs is planned) is

Re: [sqlite] read only databases and in-memory databases

2010-05-17 Thread Jay A. Kreibich
On Mon, May 17, 2010 at 02:15:09PM -0400, Sam Carleton scratched on the wall: > Michael, > > I really don't mean to be rude, but I know about the SQLITE_BUSY and that it > must be handled and all that good stuff, am I handling it right now? No; > will I? Yes, but that isn't my issue, I

Re: [sqlite] prevent sqlite from interpreting string as numbers?

2010-05-17 Thread Pavel Ivanov
> On the other hand, why doesn't sqlite give me an error or warning when I > used "string", if it has no meaning? You probably didn't read this http://www.sqlite.org/datatype3.html, did you? Pavel On Mon, May 17, 2010 at 2:59 PM, peter360 wrote: > > Ah... that is what I

Re: [sqlite] prevent sqlite from interpreting string as numbers?

2010-05-17 Thread P Kishor
On Mon, May 17, 2010 at 1:59 PM, peter360 wrote: > > Ah... that is what I missed. Thanks! > > On the other hand, why doesn't sqlite give me an error or warning when I > used "string", if it has no meaning? > Because sqlite doesn't care. You could call it "peter360string"

Re: [sqlite] prevent sqlite from interpreting string as numbers?

2010-05-17 Thread peter360
Ah... that is what I missed. Thanks! On the other hand, why doesn't sqlite give me an error or warning when I used "string", if it has no meaning? Igor Tandetnik wrote: > > peter360 wrote: >> I see this in sqlite >> >> sqlite> create table t1(c1 string); > > You want t1(c1 text). "string"

Re: [sqlite] [Windows] Application to let end-users handle records?

2010-05-17 Thread Henk Pretorius
Try SQLite Manager - a FireFox add on, but can also run stand-alone as a XUL application. On Mon, May 17, 2010 at 7:55 PM, Gilles Ganault wrote: > On Mon, 17 May 2010 18:59:36 +0200, "Olaf Schmidt" > wrote: >>I'd say, what you're looking for (in case a

Re: [sqlite] read only databases and in-memory databases

2010-05-17 Thread Black, Michael (IS)
Not rude -- just a communications problem... There's a difference between read-only and exclusive. Read-only just means you can't do inserts and creates. It's not the write mode of the database that matters. It's the transactions you run. read/write with insert/create might make selects

Re: [sqlite] read only databases and in-memory databases

2010-05-17 Thread Sam Carleton
Michael, I really don't mean to be rude, but I know about the SQLITE_BUSY and that it must be handled and all that good stuff, am I handling it right now? No; will I? Yes, but that isn't my issue, I understand I need to handle those conditions and I am confident that I know how to handle that

Re: [sqlite] Composite Foreign Key not enforced

2010-05-17 Thread George Somers
> Fixed. See http://www.sqlite.org/src/info/dd08e5a988 and http://www.sqlite.org/src/info/636f86095e Gee! That was super FAST! Thanks a lot! George Somers ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Crash SQLite [version: 3.6.23.1; tested: shell]

2010-05-17 Thread Jay A. Kreibich
On Mon, May 17, 2010 at 06:10:09PM +0100, Simon Slavin scratched on the wall: > > On 17 May 2010, at 5:48pm, Jay A. Kreibich wrote: > > > The other options is to just use fixed-point integer values (e.g. an > > integer value that is 1 cent, or 1/100th of a cent, or whatever range > > you

Re: [sqlite] Composite Foreign Key not enforced

2010-05-17 Thread George Somers
Thanks for the comment Pavel! The example was simple and meant only to show the problem. Sure, the example looks like bad database design! > your indexes on (childID, fatherID) and (childID, motherID) are useless - According to the documentation, they are required: See

Re: [sqlite] [Windows] Application to let end-users handle records?

2010-05-17 Thread Gilles Ganault
On Mon, 17 May 2010 18:59:36 +0200, "Olaf Schmidt" wrote: >I'd say, what you're looking for (in case a "softer" migration >of Excel-VBA-Devs is planned) is more a library IMO - >and not an "Application". Thanks, I'll check it out. Ideally, I was looking for a tool that would read

Re: [sqlite] Crash SQLite [version: 3.6.23.1; tested: shell]

2010-05-17 Thread Simon Slavin
On 17 May 2010, at 5:48pm, Jay A. Kreibich wrote: > The other options is to just use fixed-point integer values (e.g. an > integer value that is 1 cent, or 1/100th of a cent, or whatever range > you need). You need to be careful about the math, but that would be > much simpler. 64-bit

Re: [sqlite] [Windows] Application to let end-users handle records?

2010-05-17 Thread Olaf Schmidt
"Gilles Ganault" schrieb im Newsbeitrag news:tmr1v5lfsa26lcbooq20sh0q4358jdf...@4ax.com... > I was wondering: To help people move from Excel > to a DB to handle data, I'd like to show them a really > good Windows application that will enable them to >

Re: [sqlite] Crash SQLite [version: 3.6.23.1; tested: shell]

2010-05-17 Thread Jay A. Kreibich
On Mon, May 17, 2010 at 08:17:02AM -0700, Roger Binns scratched on the wall: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 05/17/2010 06:29 AM, Samuel Adam wrote: > > Plug for outstanding feature request: DECIMAL type > > Leaving the merits of the type aside, adding it would make the

Re: [sqlite] Composite Foreign Key not enforced

2010-05-17 Thread Nicolas Williams
On Fri, May 14, 2010 at 03:01:39PM -0400, George Somers wrote: [edited for brevity] > CREATE TABLE parent(parentID INTEGER PRIMARY KEY, ...); > > CREATE TABLE child(childID INTEGER PRIMARY KEY, fatherID INTEGER, ...); > > CREATE TABLE fatherChildActivity( >fcChildID INTEGER, >

Re: [sqlite] Composite Foreign Key not enforced

2010-05-17 Thread Richard Hipp
On Mon, May 17, 2010 at 11:34 AM, Pavel Ivanov wrote: > > But I can agree that SQLite shouldn't be confused by confusing > database schemas and enforce foreign keys correctly in all cases. > > Fixed. See http://www.sqlite.org/src/info/dd08e5a988 and

Re: [sqlite] Composite Foreign Key not enforced

2010-05-17 Thread Pavel Ivanov
Looks like the same suggestion as DRH already provided applies here: your indexes on (childID, fatherID) and (childID, motherID) are useless. You already have unique childID, adding fatherID or matherID to it doesn't change things. Also any other table can reference only childID, there's no need

Re: [sqlite] Crash SQLite [version: 3.6.23.1; tested: shell]

2010-05-17 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/17/2010 06:29 AM, Samuel Adam wrote: > Plug for outstanding feature request: DECIMAL type Leaving the merits of the type aside, adding it would make the database incompatible with every existing SQLite library version already out there. That is

Re: [sqlite] read only databases and in-memory databases

2010-05-17 Thread Black, Michael (IS)
By "breakdown in communications" you must mean lost data or incomplete results. That's probably the SQLITE_BUSY error you're probably running into and not handling. You'll stil hit the problem opening the database as read-only in the other cases. You can't do a query or a join when the

Re: [sqlite] recursive select in sqlite

2010-05-17 Thread Jean-Christophe Deschamps
>z> i wonder is there RECURSIVE select function in sqlite? the background >z> for the question are: create table objects (id INTEGER PRIMARY KEY >z> AUTOINCREMENT, name text unique) create table tree(id int, child_id >z> int, PRIMARY KEY(id, child_id)) i want to draw the whole tree, is >there

Re: [sqlite] Crash SQLite [version: 3.6.23.1; tested: shell]

2010-05-17 Thread Richard Hipp
On Mon, May 17, 2010 at 9:29 AM, Samuel Adam wrote: > CREATE TABLE "Test" >("Number" INTEGER DEFAULT (123)); >-- Was originally a dynamic default with strftime(). >-- Cut down for test case/to find crash. > CREATE TRIGGER "Automatic" >BEFORE

Re: [sqlite] read only databases and in-memory databases

2010-05-17 Thread Sam Carleton
On Mon, May 17, 2010 at 9:32 AM, Black, Michael (IS) wrote: > Well...you don't say what "problem" your customers are having. Would be > nice to know for us to help you. > At this point in time I am purely theorizing, the client is seeing a break down in communications

Re: [sqlite] recursive select in sqlite

2010-05-17 Thread Jay A. Kreibich
On Mon, May 17, 2010 at 09:40:32PM +0800, zeal scratched on the wall: > dear Sqlite group, > i wonder is there RECURSIVE select function in sqlite? the background > for the question are: > create table objects (id INTEGER PRIMARY KEY AUTOINCREMENT, name text unique) > create table tree(id int,

Re: [sqlite] recursive select in sqlite

2010-05-17 Thread Swithun Crowe
Hello z> i wonder is there RECURSIVE select function in sqlite? the background z> for the question are: create table objects (id INTEGER PRIMARY KEY z> AUTOINCREMENT, name text unique) create table tree(id int, child_id z> int, PRIMARY KEY(id, child_id)) i want to draw the whole tree, is there

[sqlite] recursive select in sqlite

2010-05-17 Thread zeal
dear Sqlite group, i wonder is there RECURSIVE select function in sqlite? the background for the question are: create table objects (id INTEGER PRIMARY KEY AUTOINCREMENT, name text unique) create table tree(id int, child_id int, PRIMARY KEY(id, child_id)) i want to draw the whole tree, is

Re: [sqlite] Crash SQLite [version: 3.6.23.1; tested: shell]

2010-05-17 Thread Black, Michael (IS)
This bug was fixed (we just went though this last week). Download a recent fossil repository and you'll be good. Sounds kind of like it's time for a new release to me. Is there any planned time for 3.7.0? Michael D. Black Senior Scientist Northrop Grumman Mission Systems

Re: [sqlite] read only databases and in-memory databases

2010-05-17 Thread Black, Michael (IS)
Well...you don't say what "problem" your customers are having. Would be nice to know for us to help you. But it sounds a LOT like you're not handling SQLITE_BUSY returns. You may be seeing SQLITE_BUSY returns from your "read data...and put" step. But that assumes you're looking for it from

[sqlite] Crash SQLite [version: 3.6.23.1; tested: shell]

2010-05-17 Thread Samuel Adam
CREATE TABLE "Test" ("Number" INTEGER DEFAULT (123)); -- Was originally a dynamic default with strftime(). -- Cut down for test case/to find crash. CREATE TRIGGER "Automatic" BEFORE INSERT ON "Test" BEGIN DELETE FROM "Test"; END;

[sqlite] read only databases and in-memory databases

2010-05-17 Thread Sam Carleton
Current situation: 1. Open a DB for read/write 2. Create a temp table 3. Read data from outside source and put into the temp table 4. Do a join on the temp table and another table in the DB 5. Return results This is happening a lot, and it might be the cause customers are having

[sqlite] RFE: Do not store NULL/default values for last columns if possible‏

2010-05-17 Thread Ben Danper
When the database format is 2 or higher (explicitly via "PRAGMA legacy_file_format = false;" or implicitly via "ALTER TABLE ... ADD COLUMN ..."), sqlite doesn't currently take advantage of the fact that NULL columns at the end don't have to be stored. For example: > PRAGMA legacy_file_format

[sqlite] [Windows] Application to let end-users handle records?

2010-05-17 Thread Gilles Ganault
Hello I was wondering: To help people move from Excel to a DB to handle data, I'd like to show them a really good Windows application that will enable them to create/read/update/delete records, and should present users with forms to handle records (not tables, as this is too abstract for users).

[sqlite] the wrong in building sqlite-3.6.23.1 on Fedora-7.0

2010-05-17 Thread liubin liu
the original version of sqlite in fedora is 3.4.2. I built the newest version on Fedora-7.0. And get the the wrong in building sqlite-3.6.23.1 on Fedora-7.0 like below: ./libtool --mode=compile --tag=CC gcc -g -O2 -DSQLITE_OS_UNIX=1 -I. -I../SQLite-b078b588d617e078/src -D_HAVE_SQLITE_CONFIG_H