Re: [sqlite] Program is crahed on sqlite3_bind_int- Could you please help

2008-01-21 Thread Dan
On Jan 22, 2008, at 9:14 AM, Joanne Pham wrote: Hi All, I still had the problem below: sqlite3_bind_int64 (pStmt=0x40058a28, i=1, iValue=10) at ./src/ vdbeapi.c:897 897./src/vdbeapi.c: No such file or directory. in ./src/vdbeapi.c Current language: auto; currently c when I used

Re: [sqlite] Program is crahed on sqlite3_bind_int

2008-01-21 Thread John Stanton
Did you change something on the machine. Is it Windows or Linux? Joanne Pham wrote: Thanks!! So how to fix this problem.. -JP - Original Message From: John Stanton <[EMAIL PROTECTED]> To: sqlite-users@sqlite.org Sent: Monday, January 21, 2008 3:11:52 PM Subject: Re: [sqlite]

Re: [sqlite] Re: Access from Multiple Processes

2008-01-21 Thread Mark Riehl
I guess the other thing I should add is that we're using Qt/Qtopia. In theory, it shouldn't matter, but, I thought I'd mention it just in case. Mark On 1/21/08, James Dennett <[EMAIL PROTECTED]> wrote: > (Top-posting and overquoting fixed.) > > On Monday, January 21, 2008 1:57 PM, Mark Riehl

Re: [sqlite] Program is crahed on sqlite3_bind_int- Could you please help

2008-01-21 Thread Joanne Pham
Hi All, I still had the problem below: > sqlite3_bind_int64 (pStmt=0x40058a28, i=1, iValue=10) at ./src/vdbeapi.c:897 > 897./src/vdbeapi.c: No such file or directory. >in ./src/vdbeapi.c > Current language: auto; currently c when I used sqlite3_bind_int. I couldn't figure out what is

Re: [sqlite] Program is crahed on sqlite3_bind_int

2008-01-21 Thread Joanne Pham
Thanks!! So how to fix this problem.. -JP - Original Message From: John Stanton <[EMAIL PROTECTED]> To: sqlite-users@sqlite.org Sent: Monday, January 21, 2008 3:11:52 PM Subject: Re: [sqlite] Program is crahed on sqlite3_bind_int It is accessing a mutex. Looks like you have something

Re: [sqlite] How to create a database in run-time

2008-01-21 Thread John Stanton
Luis Esteban Fajardo Bravo wrote: Hi! we've using SQLite on our software since about a month ago, and still i have some questions about how does sqlite works at all. I have the following sourcecode to check if a database is already created, if yes then just open, if not, open it and create

[sqlite] How to create a database in run-time

2008-01-21 Thread Luis Esteban Fajardo Bravo
Hi! we've using SQLite on our software since about a month ago, and still i have some questions about how does sqlite works at all. I have the following sourcecode to check if a database is already created, if yes then just open, if not, open it and create the appropiate schema for the

Re: [sqlite] Program is crahed on sqlite3_bind_int

2008-01-21 Thread John Stanton
It is accessing a mutex. Looks like you have something wrong with a shared library or DLL. Joanne Pham wrote: Hi All, The exactly error message below: sqlite3_bind_int64 (pStmt=0x40058a28, i=1, iValue=10) at ./src/vdbeapi.c:897 897 ./src/vdbeapi.c: No such file or directory. in

Re: [sqlite] Program is crahed on sqlite3_bind_int

2008-01-21 Thread Joanne Pham
Hi All, The exactly error message below: sqlite3_bind_int64 (pStmt=0x40058a28, i=1, iValue=10) at ./src/vdbeapi.c:897 897 ./src/vdbeapi.c: No such file or directory. in ./src/vdbeapi.c Current language: auto; currently c Thanks, JP - Original Message From: Joanne Pham

[sqlite] Program is crahed on sqlite3_bind_int

2008-01-21 Thread Joanne Pham
Hi All, I am using sqlite 3.5.2 and Suddenly my program is crashed on sqlite3_bind_int command The error message from the crash is : sqlite3_bind_int64 (pStmt=0x40058a28, i=1, iValue=10) at ./src/vdbeapi.c:897 897 ./src/vdbeapi.c: No such file or directory. in ./src/vdbeapi.c I had

[sqlite] propagate changes of schema to many shema-identical databases

2008-01-21 Thread Jean-Christophe Roux
Hello, I have a pretty high number of sqlite databases, each of them with the same schema but different data. Once in a while, I need to change the schema and I am propagating that change through a bash script that takes for instance my alter table command an applies it to every targeted

RE: [sqlite] Re: Access from Multiple Processes

2008-01-21 Thread James Dennett
(Top-posting and overquoting fixed.) On Monday, January 21, 2008 1:57 PM, Mark Riehl wrote: > > On Jan 21, 2008 4:48 PM, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > > Mark Riehl <[EMAIL PROTECTED]> wrote: > > > For some reason I haven't been able to track down, SQLite is creating > > > a journal

Re: [sqlite] Re: Access from Multiple Processes

2008-01-21 Thread Mark Riehl
I'm just executing SQL insert statements. I'm not using the BEGIN TRANSACTION; ... END TRANSACTION; wrappers around the inserts. I thought that there was an implied BEGIN ...COMMIT around every INSERT statement? Mark On Jan 21, 2008 4:48 PM, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > Mark

[sqlite] Re: Access from Multiple Processes

2008-01-21 Thread Igor Tandetnik
Mark Riehl <[EMAIL PROTECTED]> wrote: For some reason I haven't been able to track down, SQLite is creating a journal file after the C++ process connects, however, the journal file doesn't go away. Are you, by any chance, opening a transaction and keeping it open? Igor Tandetnik

[sqlite] Access from Multiple Processes

2008-01-21 Thread Mark Riehl
I'm running version SQLite 3.5.2 under Linux on a small ARM processor with a flash drive. I've got a single-threaded C++ process that inserts data into an SQLite database, and a series of PHP (v5.2.4) scripts using PDO that insert to and read from the same database. In terms of the percentages,

[sqlite] Re: Strange error "Incomplete SQL"

2008-01-21 Thread Aristotle Pagaltzis
* Aristotle Pagaltzis <[EMAIL PROTECTED]> [2008-01-21 22:29]: > $ echo -e '\n;' >> error > $ sqlite < x > $ Err, the 2nd line is of course > $ sqlite < error Regards, -- Aristotle Pagaltzis //

[sqlite] Re: Strange error "Incomplete SQL"

2008-01-21 Thread Aristotle Pagaltzis
* zak mc kracken <[EMAIL PROTECTED]> [2008-01-21 20:10]: > $ cat error > create table t(c); > select c from t; --COMMENT > $ sqlite < error > Incomplete SQL: select c from t; --COMMENT > $ sqlite -version > 2.8.17 > > if I remove the '--COMMENT' there is no error... why? > the problem persist

[sqlite] Strange error "Incomplete SQL"

2008-01-21 Thread zak mc kracken
(I oversimplified the db to show the problem) $ cat error create table t(c); select c from t; --COMMENT $ sqlite < error Incomplete SQL: select c from t; --COMMENT $ sqlite -version 2.8.17 if I remove the '--COMMENT' there is no error... why? the problem persist using /*COMMENT*/ style -- By

Re: [sqlite] SQLite character comparisons

2008-01-21 Thread Dennis Cote
Fowler, Jeff wrote: I may very well be mistaken - wouldn't be the first time!! I tried to access the actual specification from ANSI (www.ansi.org), but you either have to purchase them or access one of the "drafts" (which a couple folks in this thread have done), but the draft may or may not

RE: [sqlite] SQLite character comparisons

2008-01-21 Thread Fowler, Jeff
Hi Dennis, I may very well be mistaken - wouldn't be the first time!! I tried to access the actual specification from ANSI (www.ansi.org), but you either have to purchase them or access one of the "drafts" (which a couple folks in this thread have done), but the draft may or may not match the

Re: [sqlite] SQLite character comparisons

2008-01-21 Thread drh
John Elrick <[EMAIL PROTECTED]> wrote: > > If we are ignoring trailing spaces, then by definition: > > ' ' = '' > > and for that matter: > > ' ' = ' ' > Good point. I added these as test cases for the new RTRIM collation. http://www.sqlite.org/cvstrac/chngview?cn=4735 -- D.

Re: [sqlite] SQLite character comparisons

2008-01-21 Thread Dennis Cote
Fowler, Jeff wrote: Hello All, Not trying to be antagonistic, but I'm curious to know how many of you agree with Darren's sentiments on this issue. To restate briefly, ANSI SQL-92 specifies that when comparing two character fields, trailing spaces should be ignored. Correct me if I'm wrong

Re: [sqlite] SQLite character comparisons

2008-01-21 Thread John Elrick
Fowler, Jeff wrote: Hello All, Not trying to be antagonistic, but I'm curious to know how many of you agree with Darren's sentiments on this issue. To restate briefly, ANSI SQL-92 specifies that when comparing two character fields, trailing spaces should be ignored. My $0.02. If we are

[sqlite] Re: Re: Re: To VACUUM - or not to VACUUM?

2008-01-21 Thread Igor Tandetnik
Zbigniew Baniewski wrote: On Mon, Jan 21, 2008 at 10:43:39AM -0500, Igor Tandetnik wrote: Now, if you expect the amount of data to grow in the future, it is fine to leave free pages in. They will be reused as necessary. In other words, you don't need to VACUUM if you are happy with your file

Re: [sqlite] Re: Re: To VACUUM - or not to VACUUM?

2008-01-21 Thread Zbigniew Baniewski
On Mon, Jan 21, 2008 at 10:43:39AM -0500, Igor Tandetnik wrote: > Now, if you expect the amount of data to grow in the future, it is fine > to leave free pages in. They will be reused as necessary. In other > words, you don't need to VACUUM if you are happy with your file > retaining the high

[sqlite] Re: Re: To VACUUM - or not to VACUUM?

2008-01-21 Thread Igor Tandetnik
Zbigniew Baniewski wrote: On Mon, Jan 21, 2008 at 09:59:08AM -0500, Igor Tandetnik wrote: In the paper above I've found a ready-to-use recipe, which I'm using since, because is very practical. First I'm copying the data from "physical file" into "memory database", then I'm operating in memory -

[sqlite] Re: Re: To VACUUM - or not to VACUUM?

2008-01-21 Thread Igor Tandetnik
Zbigniew Baniewski wrote: Perhaps I had false idea on what's going on, when working with attached database. If I properly understood, in such case all the operations are taking place directly in memory No, any changes to the attached database are written to that database's file by the time

Re: [sqlite] Re: To VACUUM - or not to VACUUM?

2008-01-21 Thread Zbigniew Baniewski
On Mon, Jan 21, 2008 at 09:59:08AM -0500, Igor Tandetnik wrote: > The point of VACUUM is to reclaim pages freed by deleting records (or by > updating with less data, e.g. by removing large BLOBs). If you don't > modify the database, there's no reason to VACUUM it. > > And of course, if you

Re: [sqlite] Re: To VACUUM - or not to VACUUM?

2008-01-21 Thread Zbigniew Baniewski
On Mon, Jan 21, 2008 at 09:59:08AM -0500, Igor Tandetnik wrote: > DETACH doesn't do any writing, it just disassociates a given connection > from a paricular DB file. I don't understand what you mean by "real" > database. Is there any other kind? Perhaps I had false idea on what's going on,

[sqlite] Re: How do I add primary key on existing table?

2008-01-21 Thread Igor Tandetnik
Mohd Radzi Ibrahim <[EMAIL PROTECTED]> wrote: Using ALTER TABLE to add a constraint or a new column marked as PRIMARY KEY is not supported. You can get pretty much the same effect by doing: CREATE UNIQUE INDEX custsales_i ON custsales(id, type); Dan. Thanks for the suggestion. Will it still

[sqlite] Re: SQLite Dataypes

2008-01-21 Thread Igor Tandetnik
Vishal Mailinglist wrote: Out of curiosity , in SQLite datatypes http://sqlite.org/datatype3.html its said that all the data in version 2.x all data was stored as ASCII text , does this mean even if I create a table as create table some(id INTEGER, location varchar(10)) ; The data in column

[sqlite] Re: To VACUUM - or not to VACUUM?

2008-01-21 Thread Igor Tandetnik
Zbigniew Baniewski wrote: In the docs there is a remark: "VACUUM only works on the main database. It is not possible to VACUUM an attached database file". I'm not sure: if one works with "attached" database, making a "dbase-shot" of its contents to real database file, when ending the work -

[sqlite] To VACUUM - or not to VACUUM?

2008-01-21 Thread Zbigniew Baniewski
In the docs there is a remark: "VACUUM only works on the main database. It is not possible to VACUUM an attached database file". I'm not sure: if one works with "attached" database, making a "dbase-shot" of its contents to real database file, when ending the work - does there exist any need to

Re: [sqlite] sql optimization question

2008-01-21 Thread Jay Sprenkle
On Jan 20, 2008 9:16 PM, Ken <[EMAIL PROTECTED]> wrote: > Jay > > I've used a trigger to do this with good success. > > You'll need one trigger per table to cause the delete to cascade through > the tree. > > Or if you know that you will always delete from the top level tree"parent" > then

Re: [sqlite] sql optimization question

2008-01-21 Thread Jay Sprenkle
> In response to the deletion of (0,null), the trigger fired, deleting > (1,0), and (2,0). But the trigger didn't fire again in response to > either of these subsequent deletions, so (3,1) was not automatically > deleted. > > If anyone knows how to get around this problem, I would like to know.

[sqlite] SQLite Dataypes

2008-01-21 Thread Vishal Mailinglist
Hi , Out of curiosity , in SQLite datatypes http://sqlite.org/datatype3.html its said that all the data in version 2.x all data was stored as ASCII text , does this mean even if I create a table as create table some(id INTEGER, location varchar(10)) ; The data in column id and location both