Re: [sqlite] Problems with some SQL

2009-03-19 Thread Radu Lodina
The problem: Field UserGroup.UserGroupID is NOT declared as autoincrement field and statement: INSERT INTO UserGroup (UserGroupShortTitle ... don't fill this field. Check yourself with: SELECT * FROM UserGroup Check create autoincrement field : http://www.sqlite.org/faq.html#q1 CREATE TABLE

Re: [sqlite] problems with shared cache?

2009-03-19 Thread Damien Elmes
Well, those 3 x the number of tables in the Db. On Fri, Mar 20, 2009 at 3:17 PM, Damien Elmes wrote: > Yep - but only the three listed on this page: > > http://www.sqlite.org/cvstrac/wiki?p=UndoRedo > > So they shouldn't be modifying anything in the main DB, only the temporary DB. > > On Fri, Mar

Re: [sqlite] problems with shared cache?

2009-03-19 Thread Damien Elmes
Yep - but only the three listed on this page: http://www.sqlite.org/cvstrac/wiki?p=UndoRedo So they shouldn't be modifying anything in the main DB, only the temporary DB. On Fri, Mar 20, 2009 at 3:13 PM, Dan wrote: > > On Mar 20, 2009, at 8:10 AM, Damien Elmes wrote: > >> Unfortunately, a user

Re: [sqlite] problems with shared cache?

2009-03-19 Thread Dan
On Mar 20, 2009, at 8:10 AM, Damien Elmes wrote: > Unfortunately, a user has just reported the same primary key error > message with shared cache disabled, although the freezing appears to > have been fixed. > > However, when I ask the user to send me their deck, I find that: > > sqlite> pragma i

Re: [sqlite] sqlite3 --version showing the wrong version

2009-03-19 Thread erfon haubenstock
Ok, i think i figured it out, only took me about 8 hours! see the path i had: > $PATH=usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sb > > in:/sbin:/usr/local/bin:/usr/X11/bin it's missing the / as the very beginning of the path. i changed it to /usr/local... and no

Re: [sqlite] problems with shared cache?

2009-03-19 Thread Damien Elmes
Unfortunately, a user has just reported the same primary key error message with shared cache disabled, although the freezing appears to have been fixed. However, when I ask the user to send me their deck, I find that: sqlite> pragma integrity_check; integrity_check --- ok sqlite> sele

Re: [sqlite] [newbie] Binary and text-file storage in SQL(ite).

2009-03-19 Thread P Kishor
2009/3/19 Nuno Magalhães : > Yeah, a religious question, i know, but what's recomended?... > > I have a small site that may have some images for some products. Said > products may also have descriptions. I have other small sites and one > where i'd like to manipulate large texts (say around 5 parag

[sqlite] problems with shared cache?

2009-03-19 Thread Damien Elmes
Hi all, Some of my users have been reporting strange database problems recently, which seem to have gone away when I removed a call to enable_shared_cache(). The problems were noticeable in at least 3.6.1 and 3.6.11, when using databases of 30MB+, and doing large updates using pysqlite. There wer

[sqlite] [newbie] Binary and text-file storage in SQL(ite).

2009-03-19 Thread Nuno Magalhães
Yeah, a religious question, i know, but what's recomended?... I have a small site that may have some images for some products. Said products may also have descriptions. I have other small sites and one where i'd like to manipulate large texts (say around 5 paragraphs... ~5000 characters). What's

Re: [sqlite] Strange SQLITE_CORRUPT error

2009-03-19 Thread D. Richard Hipp
On Mar 19, 2009, at 8:33 PM, Kim, Albert wrote: > > /* The maximum page number is 2^31. Return SQLITE_CORRUPT if a page > ** number greater than this, or zero, is requested. > */ > if( pgno>PAGER_MAX_PGNO || pgno==0 || pgno==PAGER_MJ_PGNO(pPager) ){ > return SQLITE_CORRUPT_BKPT;

Re: [sqlite] sqlite3 --version showing the wrong version

2009-03-19 Thread P Kishor
On Thu, Mar 19, 2009 at 6:19 PM, erfon haubenstock wrote: > > ok so macports installed sqlite3 just fine, but how do i check the version? > i think i now have 3 versions of sqlite installed. > > 1 - when i type sqlite3 --version i get version 3.4.0 > 2 - when i type usr/local/bin/sqlite3 --version

[sqlite] Strange SQLITE_CORRUPT error

2009-03-19 Thread Kim, Albert
Hi, I'm seeing a very strange, consistently reproducible case, in which SQLITE_CORRUPT is being returned in response to a simple insert statement. There is only one connection to the db so it is unlikely a concurrency issue. The insert is immediately after the table is created. The table creati

Re: [sqlite] sqlite3 --version showing the wrong version

2009-03-19 Thread Lawrence Gold
On Mar 19, 2009, at 5:19 PM, erfon haubenstock wrote: > > ok so macports installed sqlite3 just fine, but how do i check the > version? > i think i now have 3 versions of sqlite installed. > > 1 - when i type sqlite3 --version i get version 3.4.0 > 2 - when i type usr/local/bin/sqlite3 --version

Re: [sqlite] sqlite3 --version showing the wrong version

2009-03-19 Thread erfon haubenstock
ok so macports installed sqlite3 just fine, but how do i check the version? i think i now have 3 versions of sqlite installed. 1 - when i type sqlite3 --version i get version 3.4.0 2 - when i type usr/local/bin/sqlite3 --version i get version 3.5.4 3 - I know that macports has installed 3.6.11

Re: [sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-19 Thread John Machin
On 20/03/2009 1:55 AM, Mail.sqlite wrote: > Roger: > 4. Your comments sound to me that you are living in a 7bit ASCII country, do > you? >> Mail.sqlite wrote: >>> - Please, let us try to bring down the discussion to the intended solution - a simple way to define and use a "user defined" collat

Re: [sqlite] sqlite3 --version showing the wrong version

2009-03-19 Thread erfon haubenstock
Thanks for pointing me to that piece of the guide. Copying the contents of my .profile into my .bash_login fixed the port command problem i was having : D This is my first experience with paths, .profile, or .bash_login and macports so this has all be quite a learning experience for me. I feel

Re: [sqlite] sqlite3 --version showing the wrong version

2009-03-19 Thread erfon haubenstock
Ok, we're getting somewhere now. I typed /usr/local/bin/sqlite3 -version and got 3.6.11. But when i typed sqlite3 --version i get 3.4. So it must be a path issue. This is my first experience with PATH. I know I need to change my path, but I don't know what is missing from it that is giving me

Re: [sqlite] sqlite3 --version showing the wrong version

2009-03-19 Thread Lawrence Gold
On Mar 19, 2009, at 4:29 PM, erfon haubenstock wrote: > > Hi again. Thanks for trying to help me by the way : D > > I tried relauching terminal and even restarting my computer, but to no > avail. > > I'm not totally sure I understand when you say: > > One common pitfall here is that you must open

Re: [sqlite] sqlite3 --version showing the wrong version

2009-03-19 Thread P Kishor
On Thu, Mar 19, 2009 at 5:29 PM, erfon haubenstock wrote: > > Hi again.  Thanks for trying to help me by the way : D > > I tried relauching terminal and even restarting my computer, but to no > avail. > > I'm not totally sure I understand when you say: > > One common pitfall here is that you must

Re: [sqlite] sqlite3 --version showing the wrong version

2009-03-19 Thread erfon haubenstock
Hi again. Thanks for trying to help me by the way : D I tried relauching terminal and even restarting my computer, but to no avail. I'm not totally sure I understand when you say: One common pitfall here is that you must open a new shell for the port command to be recognised (or re-export the

[sqlite] Problems with some SQL

2009-03-19 Thread thom
Heya, I'm currently working on a simple setup for a news and user system. However, I'm having some issues with the SQL I'm using. It's available @ http://geekerzoid.pastebin.com/m532d173a I keep getting "SQL error: foreign-key violation: UserGroup.UserGroupID" Any help would be greatly appreciat

Re: [sqlite] checking if a record exist or not

2009-03-19 Thread jose isaias cabrera
"P Kishor" wrote > On Thu, Mar 19, 2009 at 12:01 PM, jose isaias cabrera wrote: >> >> Greetings... >> >> I am updating an sqlite db from another sqlite db and it is working fine, >> unless the record does not exists. ie. >> >> "ATTACH db2 AS client; "; >> >> BEGIN; >> INSERT OR REPLACE INTO LSOpen

Re: [sqlite] checking if a record exist or not

2009-03-19 Thread jose isaias cabrera
"Igor Tandetnik" wrote... > jose isaias cabrera > wrote: >> I am updating an sqlite db from another sqlite db and it is working >> fine, unless the record does not exists. ie. >> >> "ATTACH db2 AS client; "; >> >> BEGIN; >> INSERT OR REPLACE INTO LSOpenJobs >> SELECT * FROM

Re: [sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-19 Thread Jay A. Kreibich
On Thu, Mar 19, 2009 at 12:31:00PM -0700, Noah Hart scratched on the wall: > Rather my point is that it would be of benefit if SQLite would have > some built in mechanism for a rule-based collation. SQLite *does* have a mechanism for "rule-based" or any-other based collations: User defined c

Re: [sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-19 Thread Noah Hart
Nico wrote: >> Number 1, the database is no longer portable. The only solution to >> this is to include the functionality in the core. >Yes but, there is no single Unicode collation. Collation is >language-specific, even when using Unicode. Thus you're asking that >SQLite3 have a plethora of bu

Re: [sqlite] memory and db size

2009-03-19 Thread Kees Nuyt
On Thu, 19 Mar 2009 08:14:52 -0700 (PDT), anjela patnaik wrote: > Hello all, > > I'm working on a GUI application using Tcl/Tk with > sqlite back end on windows. Now, multiple users will be > running this and all users must have a copy of the db > local to their PC or in a shared drive. At least

Re: [sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-19 Thread Nicolas Williams
On Thu, Mar 19, 2009 at 09:52:55AM -0700, Noah Hart wrote: > I've been reading and thinking about this topic for a while, and would > like to add my thoughts. > > I realize that we don't "vote" on features, but I feel that this type > of idea has merit. > > It is true, that SQLite has user define

Re: [sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-19 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mail.sqlite wrote: > 4. Your comments sound to me that you are living in a 7bit ASCII country, do > you? I am British but currently happen to live in the US, and have lived in every hemisphere whether you cut the earth horizontally or vertically. My

Re: [sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-19 Thread Noah Hart
Igor Tandetnik writes: >This is not quite true. You say custom functions are supported: then you can >do ORDER BY sortkey(textField), >with a suitably defined sortkey() function >(see strxfrm, LCMapString). You can't however build indexes using >such a >function, something you can do with a col

Re: [sqlite] checking if a record exist or not

2009-03-19 Thread P Kishor
On Thu, Mar 19, 2009 at 12:01 PM, jose isaias cabrera wrote: > > Greetings... > > I am updating an sqlite db from another sqlite db and it is working fine, > unless the record does not exists.  ie. > >    "ATTACH db2 AS client; "; > >    BEGIN; >    INSERT OR REPLACE INTO LSOpenJobs >          SEL

Re: [sqlite] memory and db size

2009-03-19 Thread Griggs, Donald
-Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of anjela patnaik Sent: Thursday, March 19, 2009 11:15 AM To: sqlite-users@sqlite.org Subject: [sqlite] memory and db size Hello all,   I'm working on a GUI application using Tcl/

Re: [sqlite] checking if a record exist or not

2009-03-19 Thread Igor Tandetnik
jose isaias cabrera wrote: > I am updating an sqlite db from another sqlite db and it is working > fine, unless the record does not exists. ie. > > "ATTACH db2 AS client; "; > > BEGIN; > INSERT OR REPLACE INTO LSOpenJobs > SELECT * FROM client.LSOpenJobs > WHERE

Re: [sqlite] What am I doing wrong ?

2009-03-19 Thread Igor Tandetnik
Olivier FAURAX wrote: > I tried with -1 and the length value of the string, but it didn't > help... Post a small complete compilable program that reproduces the problem. I don't see anything wrong in the code you've shown - hence, the problem is likely in the code you haven't. Igor Tandetnik

Re: [sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-19 Thread Igor Tandetnik
Noah Hart wrote: > Number 2, your platform may not support the sqlite3_create_collation > interface. For example, Firefox now includes SQLite. Unfortunately, > while Firefox supports user defined functions, their implementation > does not support user defined collations. > > Someone commented that

Re: [sqlite] What am I doing wrong ?

2009-03-19 Thread Olivier FAURAX
I tried : rc = sqlite3_prepare_v2(metadata_db, "INSERT INTO metadata VALUES " "( ?1, ?2, ?3, ?4 ); COMMIT;", -1, &sthl, NULL); But this didn't helped. Anyway, thanks for your help. Olivier Hoover, Jeffrey a écrit : > is autoc

Re: [sqlite] What am I doing wrong ?

2009-03-19 Thread Olivier FAURAX
Igor Tandetnik a écrit : > Olivier FAURAX wrote: >> I'm beginner and uses sqlite3. >> I'm trying to record informations in a database, but this fails. >> I have followed http://www.sqlite.org/c3ref/stmt.html >> >> rc = sqlite3_open(DB_FILENAME, &metadata_db); >> rc = sqlite3_exec(metadata_db, >>

[sqlite] checking if a record exist or not

2009-03-19 Thread jose isaias cabrera
Greetings... I am updating an sqlite db from another sqlite db and it is working fine, unless the record does not exists. ie. "ATTACH db2 AS client; "; BEGIN; INSERT OR REPLACE INTO LSOpenJobs SELECT * FROM client.LSOpenJobs WHERE login='x' AND XtraB > '2000'

Re: [sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-19 Thread Noah Hart
I've been reading and thinking about this topic for a while, and would like to add my thoughts. I realize that we don't "vote" on features, but I feel that this type of idea has merit. It is true, that SQLite has user defined collations, and a extension could be registered, but the problem wit

Re: [sqlite] What am I doing wrong ?

2009-03-19 Thread Igor Tandetnik
Olivier FAURAX wrote: > I'm beginner and uses sqlite3. > I'm trying to record informations in a database, but this fails. > I have followed http://www.sqlite.org/c3ref/stmt.html > > rc = sqlite3_open(DB_FILENAME, &metadata_db); > rc = sqlite3_exec(metadata_db, > "CREATE TABLE IF N

[sqlite] memory and db size

2009-03-19 Thread anjela patnaik
Hello all,   I'm working on a GUI application using Tcl/Tk with sqlite back end on windows. Now, multiple users will be running this and all users must have a copy of the db local to their PC or in a shared drive. At least that is my understanding of how sqlite works.   1. What are my options if

Re: [sqlite] What am I doing wrong ?

2009-03-19 Thread Hoover, Jeffrey
is autocommit on? try adding a manual commit. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Olivier FAURAX Sent: Thursday, March 19, 2009 10:56 AM To: General Discussion of SQLite Database Subject: [sqlite] What am I doing wr

[sqlite] What am I doing wrong ?

2009-03-19 Thread Olivier FAURAX
Hello, I'm beginner and uses sqlite3. I'm trying to record informations in a database, but this fails. I have followed http://www.sqlite.org/c3ref/stmt.html rc = sqlite3_open(DB_FILENAME, &metadata_db); rc = sqlite3_exec(metadata_db, "CREATE TABLE IF NOT EXISTS metadata "

Re: [sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-19 Thread Mail.sqlite
Roger: 1. Sorry, I don’t want to screw up somebody with my post 2. It was not my proposal 3. Thank you for the information that I may program/implement whatever I want 4. Your comments sound to me that you are living in a 7bit ASCII country, do you? George > -Ursprüngliche Nachricht-

Re: [sqlite] is primary key already indexed ?

2009-03-19 Thread Kees Nuyt
On Thu, 19 Mar 2009 06:38:33 -0700 (PDT), baxy77bax wrote: >:-D > >one more question : > >if i create primary key on my table and then import the data (assuming i >used transactions) will my import be faster or slower vs the case where i >import the data first and then create key (foreign key ??

Re: [sqlite] httpd server ???

2009-03-19 Thread John Stanton
It is not an open source project but you are welcome to access to the source code.and notes. The intent of the project is to provide a highly efficient application server for AJAX support of browser-based IT networks. To that end the design criteria were: o Minimize process and thread creat

Re: [sqlite] is primary key already indexed ?

2009-03-19 Thread baxy77bax
nop no i ment up to 50 MB an these are tough to import(i just wanted to mention that because on these records import is slownig down and it is not so fast any more example if i import one set of data that is small and the other that is large the overall time is T1= t1 +t2 but if i mix those data

Re: [sqlite] is primary key already indexed ?

2009-03-19 Thread D. Richard Hipp
On Mar 19, 2009, at 9:38 AM, baxy77bax wrote: > > > :-D > > one more question : > > if i create primary key on my table and then import the data > (assuming i > used transactions) will my import be faster or slower vs the case > where i > import the data first and then create key (foreign ke

Re: [sqlite] is primary key already indexed ?

2009-03-19 Thread baxy77bax
:-D one more question : if i create primary key on my table and then import the data (assuming i used transactions) will my import be faster or slower vs the case where i import the data first and then create key (foreign key ??) and index the table. the point is that i need my import to be f

Re: [sqlite] is primary key already indexed ?

2009-03-19 Thread baxy77bax
:-D one more question : if i create primary key on my table and then import the data (assuming i used transactions) will my import be faster or slower vs the case where i import the data first and then create key (foreign key ??) and index the table. the point is that i need my import to be f

Re: [sqlite] Any available free SQLite Database Comparer/Diff Tool?

2009-03-19 Thread Kees Nuyt
On Thu, 19 Mar 2009 19:06:52 +0800, Ev wrote: >Any available free SQLite Database Comparer/Diff Tool? At least one tool is listed on http://www.sqlite.org/cvstrac/wiki?p=ManagementTools And of course you can diff a dump: # sqlite3 test_38.db3 .dump >t38 # sqlite3 test_41.db3 .dump >t41 # diff

Re: [sqlite] Newbie question

2009-03-19 Thread Hoover, Jeffrey
In the first query the (select id from tbl2 where name='Joe') is referred to as a SUBQUERY. The second query is uses a JOIN because you are joining together data from different rows. -Jeff -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]

Re: [sqlite] FW: [Bug 482300] Firefox does not display back buttons or allow bookmarks

2009-03-19 Thread D. Richard Hipp
On Mar 18, 2009, at 4:18 PM, Lessinger, Robert A. wrote: > Hello, > > I’m hoping that someone will be able to assist me in figuring out > why Firefox consistently fails to operate properly for our Macintosh > users here at St. Cloud State University. I’ve created a bug report > with bugzil

Re: [sqlite] sqlite3 --version showing the wrong version

2009-03-19 Thread Jean-Denis Muys
On 3/19/09 12:20 PM, "erfon haubenstock" wrote: > > EEESH, i installed macports and when i try to port install i get an error > that says the error "port: command not found" > > maybe this has something to do with it? my > $PATH=usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin

Re: [sqlite] sqlite3 --version showing the wrong version

2009-03-19 Thread erfon haubenstock
EEESH, i installed macports and when i try to port install i get an error that says the error "port: command not found" maybe this has something to do with it? my $PATH=usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin Jean-Denis Muy

[sqlite] FW: [Bug 482300] Firefox does not display back buttons or allow bookmarks

2009-03-19 Thread Lessinger, Robert A.
Hello, I’m hoping that someone will be able to assist me in figuring out why Firefox consistently fails to operate properly for our Macintosh users here at St. Cloud State University. I’ve created a bug report with bugzilla, but am now being referred to your organization. The bug report # is

[sqlite] Any available free SQLite Database Comparer/Diff Tool?

2009-03-19 Thread Ev
Any available free SQLite Database Comparer/Diff Tool? Thanks, Ev ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] is primary key already indexed ?

2009-03-19 Thread Kees Nuyt
On Thu, 19 Mar 2009 02:54:34 -0700 (PDT), baxy77bax wrote: > >hi my question is : if i create table that contains primary key like; > >create table TEST (field1 varchar not null primary key); > >do i need to create index on it or not? No, the primary key implies an index will be created automati

Re: [sqlite] Schema syntax error

2009-03-19 Thread Kees Nuyt
On Thu, 19 Mar 2009 03:39:11 +0200, Tristan Seligmann wrote: >Divmod Axiom[1] is a Python ORM built on SQLite; one of the book >keeping tables it creates in the database has a column named >"indexed", which became a reserved word around SQLite 3.6.4 (?). The >"obvious" fix for this problem is to

Re: [sqlite] is primary key already indexed ?

2009-03-19 Thread Martin.Engelschalk
Hi,. baxy77bax schrieb: > hi my question is : if i create table that contains primary key like; > > create table TEST (field1 varchar not null primary key); > > do i need to create index on it or not? > Yes, the primary key is indexed > and is it better to create table with a primary key and th

Re: [sqlite] sqlite3 --version showing the wrong version

2009-03-19 Thread Jean-Denis Muys
On 3/19/09 11:07 AM, "erfon haubenstock" wrote: > > Hello Jean-Denis! I did it manually in terminal. I'm not familiar with > macports or finks. > > Here's the exact code i used: > > $ curl http://www.sqlite.org/sqlite-3.6.11.tar.gz | tar zx > $ cd sqlite-3.6.11 > $ ./configure --prefix=/u

Re: [sqlite] sqlite3 --version showing the wrong version

2009-03-19 Thread erfon haubenstock
Hello Jean-Denis! I did it manually in terminal. I'm not familiar with macports or finks. Here's the exact code i used: $ curl http://www.sqlite.org/sqlite-3.6.11.tar.gz | tar zx $ cd sqlite-3.6.11 $ ./configure --prefix=/usr/local $ make $ sudo make install thank you :-) erfon Jean-Denis

Re: [sqlite] sqlite3 --version showing the wrong version

2009-03-19 Thread Jean-Denis Muys
On 3/19/09 10:28 AM, "erfon haubenstock" wrote: > > This is really strange. I'm using a mac with leopard which comes with > version 3.4.0 installed. I've installed 3.6.11, and it installs > successfully as far as I can tell, but then when I check the version with > sqlite3 --version in termina

[sqlite] is primary key already indexed ?

2009-03-19 Thread baxy77bax
hi my question is : if i create table that contains primary key like; create table TEST (field1 varchar not null primary key); do i need to create index on it or not? and is it better to create table with a primary key and then import data in it or create table without a key , import data and t

[sqlite] sqlite3 --version showing the wrong version

2009-03-19 Thread erfon haubenstock
This is really strange. I'm using a mac with leopard which comes with version 3.4.0 installed. I've installed 3.6.11, and it installs successfully as far as I can tell, but then when I check the version with sqlite3 --version in terminal, the version is shows that the installed version is STILL