Re: [sqlite] Recursive Triggers

2004-12-03 Thread Andrew Piskorski
On Fri, Dec 03, 2004 at 07:04:56PM -0500, D. Richard Hipp wrote: > By disallowing recursive triggers, SQLite avoids the > infinite loop above. But there are useful things one > could do with recursive triggers that do not involve > infinite loops. I would like to relax the constraint > Question

Re: [sqlite] commas in columns and temporary tables

2004-12-03 Thread Taj Morton
Hi Ulrik, Now, that's all fine and everything for interactive SQL, but when I'm using this in a program (written in Delphi), the comma messes up the returned values (since they are comma seperated) You can do escaping that replaces the comma with something else when writing to the table, then

Re: [sqlite] commas in columns and temporary tables

2004-12-03 Thread Taj Morton
Dennis Cote wrote: Taj Morton wrote: Now, I've got two questions. The first is that I have a column (company) in a customers table. The problem is that this column has a comma in it for some rows. That's no good :(. Does anyone have any suggestions on what to do about this problem? I'm using SQLite

Re: [sqlite] Recursive Triggers

2004-12-03 Thread Charles Mills
On Dec 3, 2004, at 4:04 PM, D. Richard Hipp wrote: SQLite does not currently support recursive triggers. On of the main reasons for not supporting recursive triggers is that disallowing recursive triggers was seen as the easiest way to avoid infinite loops like this: CREATE TRIGGER loop AFTER UP

[sqlite] Recursive Triggers

2004-12-03 Thread D. Richard Hipp
SQLite does not currently support recursive triggers. On of the main reasons for not supporting recursive triggers is that disallowing recursive triggers was seen as the easiest way to avoid infinite loops like this: CREATE TRIGGER loop AFTER UPDATE OF table1 BEGIN UPDATE table1 SET cnt=

Re: [sqlite] FW: SQL error: no such column: State

2004-12-03 Thread Kurt Welgehausen
> Executing > sqlite> .schema BillingNumbers shows the column to be there > > CREATE TABLE BillingNumbers(id int default 0 not null, clecID int default 0 > not null, ilecID int default 0 not null, BillingNumber > varchar(20) default " not null, State varchar(20) default " not null, > Resale int def

Re: [sqlite] Storing precompiled queries/vm?

2004-12-03 Thread D. Richard Hipp
Keith Herold wrote: 3.0 supports precompiled queries natively; is it possible to store the vm in a resource dll or something, load it up when the application starts, and then attach an open sqlite db to the stored vm? No. The compiler in SQLite is very efficient. It is likely that it would take

[sqlite] Storing precompiled queries/vm?

2004-12-03 Thread Keith Herold
3.0 supports precompiled queries natively; is it possible to store the vm in a resource dll or something, load it up when the application starts, and then attach an open sqlite db to the stored vm? My impression was no, based on the API and the lack of information on wiki and the mailing list abou

Re: [sqlite] FW: SQL error: no such column: State

2004-12-03 Thread Guy Hachlili
At 12:51 03/12/2004 -0600, you wrote: When The Table is created in code with the following statements cmd.CommandText = "CREATE TABLE BillingNumbers(id int default 0 not null, " & _ "clecID int default 0 not null, " & _ "ilecID int default 0 not null, " & _ "BillingNumber varchar(20) default "" no

Re: [sqlite] FW: SQL error: no such column: State

2004-12-03 Thread Clay Dowling
Mike Willhite said: > cmd.CommandText = "CREATE TABLE BillingNumbers(id int default not null," > "clecID int default not null, " & _ > "ilecID int default not null, " & _ > "BillingNumber varchar(20) default "" not null, " & _ > "State varchar(20) default "" not null, " & _ > "Resale int defau

[sqlite] FW: SQL error: no such column: State

2004-12-03 Thread Mike Willhite
_ From: Mike Willhite [mailto:[EMAIL PROTECTED] Sent: Friday, December 03, 2004 12:13 PM To: '[EMAIL PROTECTED]' Subject: SQL error: no such column: State System Configuration: Microsoft Windows Server 2003 Ver. 5.2.3790 CoreLab MySQLDirect.NET Ver. 2.70.0 05.11.04 Microso

[sqlite] busy handler?

2004-12-03 Thread Xavier Aguila
Hi everybody! i'm running my multi-threads program under linux, so in that program i'm tring to do an INSERT, a number x of times. sqlite libraries are compiled with threadsafe, and i have a sqlite3_busy_handler in each connection to database (there is a different connection for each thread), s

Re: [sqlite] PySQLcrypt

2004-12-03 Thread Ng Pheng Siong
On Fri, Dec 03, 2004 at 09:56:42PM +0800, Ng Pheng Siong wrote: > PySQLcrypt is an enhanced version of PySQLite that uses SQLcrypt, which > itself enhances SQLite version 3 with transparent AES encryption. I'm apologise for following up to myself, but I forgot to mention that I've posted a blog en

[sqlite] PySQLcrypt

2004-12-03 Thread Ng Pheng Siong
Hi all, PySQLcrypt is an enhanced version of PySQLite that uses SQLcrypt, which itself enhances SQLite version 3 with transparent AES encryption. Download it here and take a look: http://sandbox.rulemaker.net/ngps/Dist/pysqlcrypt-1.1.4.zip This is based on PySQLite 1.1.4 and is for Python 2.3

Re: [sqlite] TRANSACTION-question

2004-12-03 Thread D. Richard Hipp
[EMAIL PROTECTED] wrote: I work via sqlite3_prepare and submit this transaction at once... What I now saw is that prepare only parses 1 action ... Is that correct? Yes -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565

Re: [sqlite] TRANSACTION-question

2004-12-03 Thread [EMAIL PROTECTED]
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mime-Version: 1.0 Content-Type: multipart/mixed; x-avg-checked=avg-ok-786B32B5; boundary="===176C28DF===" - --===176C28DF=== Content-Type: text/plain; x-avg-checked=avg-ok-786B32B5; charset=us-ascii; format=flowed Content-Transfer-En

Re: [sqlite] Clearing of memory

2004-12-03 Thread Steven Van Ingelgem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mime-Version: 1.0 Content-Type: multipart/mixed; x-avg-checked=avg-ok-786B32B5; boundary="===733C1D2===" - --===733C1D2=== Content-Type: multipart/alternative; x-avg-checked=avg-ok-786B32B5; boundary="=_30639234==

Re: [sqlite] Clearing of memory

2004-12-03 Thread D. Richard Hipp
Steven Van Ingelgem wrote: That's what I thought... int r = sqlite3_finalize(m_Stmt); if ( r != SQLITE_OK ) { m_szErrorMsg = wxString(sqlite3_errmsg(m_DB), wxConvUTF8); return false; } The error I got is: "cannot start a transaction within a transaction" (cfr previous mail). Thus th

Re: [sqlite] Clearing of memory

2004-12-03 Thread Steven Van Ingelgem
That's what I thought...   int r = sqlite3_finalize(m_Stmt);   if ( r != SQLITE_OK )   {     m_szErrorMsg = wxString(sqlite3_errmsg(m_DB), wxConvUTF8);     return false;   } The error I got is: "cannot start a transaction within a transaction" (cfr previous mail). Thus the memory ain't cleared..

Re: [sqlite] Clearing of memory

2004-12-03 Thread D. Richard Hipp
Steven Van Ingelgem wrote: Hi, Another question that arises is ... How do I clear my memory... Call sqlite3_finalize() on every pointer you got from sqlite3_prepare(). Then call sqlite3_close(). -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565

Re: [sqlite] TRANSACTION-question

2004-12-03 Thread D. Richard Hipp
Steven Van Ingelgem wrote: Hi, I do the following (SQLite 308 from C++ source in windows): BEGIN DEFERRED TRANSACTION;DELETE FROM Inbox;INSERT...;COMMIT TRANSACTION; END TRANSACTION; Now, nothing is done? Nothing inserted, nothing deleted from Inbox... Probably you are encountering an error which

Re: [sqlite] TRANSACTION-question

2004-12-03 Thread Steven Van Ingelgem
Hmmm, it doesn't work... It still doesn't write to the database. When I do everything without a transaction, it is written correctly, but I don't want it because I first empty the whole table. Now if the pc crashes, everything is lost. And that's not what I want... So only when the complete tran

Re: [sqlite] SQLite 3.08 Deadlock in a Linux Multithreaded Multi-Process Application

2004-12-03 Thread Andrew Piskorski
On Thu, Dec 02, 2004 at 04:50:57PM -0500, D. Richard Hipp wrote: > For additional information on the brokenness of POSIX > advisory locks and of POSIX threads, and in particular > how they are especially broken when used together, read > the comments in the source file os_unix.c. Interesting. (I

Re: [sqlite] TRANSACTION-question

2004-12-03 Thread P. Morandi
Yes, you do it. Bye - Original Message - From: Steven Van Ingelgem To: [EMAIL PROTECTED] Sent: Friday, December 03, 2004 10:02 AM Subject: Re: [sqlite] TRANSACTION-question Do you automatically end a transaction when committing? At 09:11 3/12/2004, you wrote: Hi St

Re: [sqlite] TRANSACTION-question

2004-12-03 Thread Steven Van Ingelgem
Do you automatically end a transaction when committing? At 09:11 3/12/2004, you wrote: Hi Steven, I used transactions in C++ code (windows and linux) with sqlite 2.8; try the sequence " BEGIN; DELETE ...; INSERT ...; COMMIT; ", it works in 2.8. Regards Paolo   - Original Message -   Fr

[sqlite] Clearing of memory

2004-12-03 Thread Steven Van Ingelgem
Hi, Another question that arises is ... How do I clear my memory... I try to close a database with a query (transaction: cfr previous mail) prepared & database opened: Is it enough to do "sqlite3_finalize" (which is not when for example you are in a transaction -> memory ain't cleared). Is it e

Re: [sqlite] TRANSACTION-question

2004-12-03 Thread P. Morandi
Hi Steven, I used transactions in C++ code (windows and linux) with sqlite 2.8; try the sequence " BEGIN; DELETE ...; INSERT ...; COMMIT; ", it works in 2.8. Regards Paolo - Original Message - From: Steven Van Ingelgem To: [EMAIL PROTECTED] Sent: Friday, December 03, 2004 8:51 A