Re: [sqlite] Newbie Question

2005-10-14 Thread JohnD
Bob, I was able to compile on Linux after removing tclsqlite.c from the build. It appears as though that was causing my errors. Once I removed that, by changing HAVE_TCL = 1 to HAVE_TCL = It compiled without errors. I found this in another thread which indicated, to me at least, that it

Re: [sqlite] drop statement returns SQLITE_ERROR

2005-10-14 Thread Preston
You right... i had even been following a similar thread and didn't realize that it was my problem too.. thanks a ton! --preston - Original Message - From: "Robert Simpson" <[EMAIL PROTECTED]> To: Sent: Friday, October 14, 2005 2:55 PM Subject: Re: [sqlite]

Re: [sqlite] drop statement returns SQLITE_ERROR

2005-10-14 Thread Robert Simpson
- Original Message - From: "Preston" <[EMAIL PROTECTED]> To: Sent: Friday, October 14, 2005 1:21 PM Subject: Re: [sqlite] drop statement returns SQLITE_ERROR Here is the full source to a stripped down version of the app i am truing to debug. It exhibits the

[sqlite] Question: Insert trigger to make an insert conditional

2005-10-14 Thread Jay Godse
Hi. I would like to put an insert trigger on a table A before the insert where the insert only happens if the values in the new row meet certain conditions. I can achieve the same result by having the trigger run after the insert on Table A and delete the newly inserted row if the row does not

Re: [sqlite] Infinite loop on sqlite3_close()

2005-10-14 Thread Preston Zaugg
From: Jens Miltner <[EMAIL PROTECTED]> Reply-To: sqlite-users@sqlite.org To: sqlite-users@sqlite.org Subject: Re: [sqlite] Infinite loop on sqlite3_close() Date: Fri, 14 Oct 2005 17:38:04 +0200 Am 10.10.2005 um 16:53 schrieb Preston Zaugg: While running some performance tests i ran into a

Re: [sqlite] locking problem (on insert inside callback)

2005-10-14 Thread Rachel Willmer
> Solution 1 is to use a TEMP table: > > CREATE TEMP TABLE diffs AS > SELECT * FROM table1 LEFT JOIN table2 ; > SELECT * FROM diffs; -- Insert into table1 in the callback; > DROP TABLE diffs; that sounds like the answer for me thanks Rachel

Re: [sqlite] locking problem (on insert inside callback)

2005-10-14 Thread Rachel Willmer
> I'm not sure I understand your logic. Your left join > indicates that there are records missing from table2, > so I would expect that you want to insert the missing > records into table2. Assuming that's what you meant, > > insert into table2 > select * from table1 > where table1.field not

Re: [sqlite] Please, please do _not_ remove this feature from SQLite...

2005-10-14 Thread Jens Miltner
Am 12.10.2005 um 12:12 schrieb pilot pirx: P.S. On somewhat related note: since sqlite is written in C - why it does not expose some basic functions from the standard C library (log, exp, sqrt, sin), at least optionally? Understandably, the idea is to keep it 'lite'. But, may be, an

Re: [sqlite] Infinite loop on sqlite3_close()

2005-10-14 Thread Jens Miltner
Am 10.10.2005 um 16:53 schrieb Preston Zaugg: While running some performance tests i ran into a condition where sqlite3_close got caught in an infinite loop. The loop it gets caught in is on line main.c 194: while( pPrev && pPrev->pNext!=db ){ pPrev = pPrev->pNext; } This did not

Re: [sqlite] locking problem (on insert inside callback)

2005-10-14 Thread Kurt Welgehausen
> SELECT * FROM table1 LEFT JOIN table2 on table1.field=table2.field > WHERE table2.field is NULL > > So far, so good, I get the records I want. Then in the callback, I try > > INSERT INTO table1 etc... I'm not sure I understand your logic. Your left join indicates that there are records missing

[sqlite] glibc version issue

2005-10-14 Thread Craig Jacobs
I am trying to use sqlite in an embedded linux application. Unfortunately, the OS we are running on the system is a bit old and there is no great way to update existing units. When I tried to load the sqlite library, it complains about GLIBC_VERSION not matching. I haven't really gotten into

Re: [sqlite] locking problem (on insert inside callback)

2005-10-14 Thread Jay Sprenkle
Why do it in the call back? Why not just do it in sql: CREATE TEMP TABLE diffs AS SELECT * FROM table1 LEFT JOIN table2 ; insert into table1 SELECT * FROM diffs; -- Insert into table1 DROP TABLE diffs; On 10/14/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Rachel Willmer <[EMAIL

Re: [sqlite] detecting database corruption?

2005-10-14 Thread drh
Wilson Yeung <[EMAIL PROTECTED]> wrote: > > Does SQLite detect database corruption? If so, what kind of > corruption is detected and how does it do so? > SQLite does attempt to detect corruption in database files and returns SQLITE_CORRUPT when it finds it. The regression test suite for

Re: [sqlite] drop statement returns SQLITE_ERROR

2005-10-14 Thread drh
"Preston Zaugg" <[EMAIL PROTECTED]> wrote: > > > >This is probably an SQLITE_SCHEMA error. Rerun sqlite3_prepare() and > >sqlite3_step() and it should work the second time. > > > >This particular SQLITE_SCHEMA error seems unnecessary though. Looks > >like sqlite3_step() could probably do a

Re: [sqlite] locking problem (on insert inside callback)

2005-10-14 Thread drh
Rachel Willmer <[EMAIL PROTECTED]> wrote: > Hi, apologies if this is a trivial question, but I'm a newbie to > sqlite3. (very impressed so far) > > I want to search two tables which should contain the same records and > add any that are missing from the second into the first. > > So I do > >

RE: [sqlite] Static library for sqlite for Windows

2005-10-14 Thread Murugan, Muthulakshmi
Thanks for your response. It helps. Thanks, Lakshmi. > > I have downloaded the sqlite 3.2.7. binary version for > Windows. But I > > found no libsqlite3.lib. > > Can anyone help in this regard? > > See http://www.sqlite.org/cvstrac/wiki?p=HowToCompile > > This question comes up so often that

[sqlite] locking problem (on insert inside callback)

2005-10-14 Thread Rachel Willmer
Hi, apologies if this is a trivial question, but I'm a newbie to sqlite3. (very impressed so far) I want to search two tables which should contain the same records and add any that are missing from the second into the first. So I do SELECT * FROM table1 LEFT JOIN table2 on

Re: [sqlite] Static library for sqlite for Windows

2005-10-14 Thread Eric Bohlman
Murugan, Muthulakshmi wrote: I have downloaded the sqlite 3.2.7. binary version for Windows. But I found no libsqlite3.lib. Can anyone help in this regard? See http://www.sqlite.org/cvstrac/wiki?p=HowToCompile This question comes up so often that it should really be included in the FAQ.

Re: [sqlite] Newbie Question

2005-10-14 Thread Robert L Cochran
Post the error messages and someone will help you. I'll also check for messages after work tonight. There are others on this forum who are far more knowledgable than I. Bob JohnD wrote: Bob, Thanks for the information. Are the required dependencies for Sqlite listed anywhere? I'm

Re[2]: [sqlite] 3.2.7 and russian characters

2005-10-14 Thread Sergey Startsev
Hello, Thursday, October 13, 2005, 7:15:46 PM, you wrote: dhc> The sqlite3_open() routine is suppose to accept the filename dhc> as UTF-8. There was a bug in earlier versions of SQLite that dhc> allowed ISO-8859-? names to be used. That bug was fixed. Probably dhc> your program is depending

Re: [sqlite] Newbie Question

2005-10-14 Thread JohnD
Bob, Thanks for the information. Are the required dependencies for Sqlite listed anywhere? I'm unable to compile on Linux and it appears as though I'm missing a dependency or two. Any idea where I can check those? Thanks, John Robert L Cochran wrote: I think sqlite3.h is generated for

[sqlite] Static library for sqlite for Windows

2005-10-14 Thread Murugan, Muthulakshmi
Hi, I have downloaded the sqlite 3.2.7. binary version for Windows. But I found no libsqlite3.lib. Can anyone help in this regard? Thanks, Lakshmi.