Re: [sqlite] setting a date in a BEFORE INSERT trigger

2009-05-11 Thread BareFeet
Hi Sam Carleton wrote: > This is my first BEFORE INSERT trigger in SQLite and I am getting an > error: > > SQL error: near "new": syntax error > CREATE TRIGGER ti_Customer BEFORE INSERT ON Customer > BEGIN > new.instertedon = DATETIME('NOW'); > new.updatedon = new.instertedon; >

Re: [sqlite] problem with sqlite in c#.net

2009-05-11 Thread John Machin
On 12/05/2009 9:30 AM, John Machin wrote: > On 12/05/2009 8:31 AM, manp wrote: >> when i execute a query like this >> UPDATE setting SET value="red" WHERE name="color" >> the row will update temporary while app is running , when i close app noting >> appear in DB >> i use ManagedSQLite dll > > I

Re: [sqlite] problem with sqlite in c#.net

2009-05-11 Thread John Machin
On 12/05/2009 8:31 AM, manp wrote: > when i execute a query like this > UPDATE setting SET value="red" WHERE name="color" > the row will update temporary while app is running , when i close app noting > appear in DB > i use ManagedSQLite dll I presume that you refer to this:

[sqlite] problem with sqlite in c#.net

2009-05-11 Thread manp
when i execute a query like this UPDATE setting SET value="red" WHERE name="color" the row will update temporary while app is running , when i close app noting appear in DB i use ManagedSQLite dll -- View this message in context:

Re: [sqlite] commit fails with no active transaction

2009-05-11 Thread Igor Tandetnik
"Blasfamous Tshirts" wrote in message news:ca0e99280905110459m5d9d9e36q15e8188b762ce...@mail.gmail.com > 1. If there is a commit already in progress and I start another > begin/commit > block on this connection >From a different thread, I presume? SQLite uses a simple mutex

Re: [sqlite] commit fails with no active transaction

2009-05-11 Thread Blasfamous Tshirts
Thanks Igor for the quick response; bless your soul. So I will fire away a few more questions surrounding this :) 1. If there is a commit already in progress and I start another begin/commit block on this connection, will this begin or commit fail? If so, with what error? 2. If yes to (1) then

Re: [sqlite] commit fails with no active transaction

2009-05-11 Thread Igor Tandetnik
"Blasfamous Tshirts" wrote in message news:ca0e99280905110444x26c5499fn51cf794932a5d...@mail.gmail.com > Under what scenarios can commit fail with this error "no active > transaction"? > > I have a BEGIN just before a for loop and a COMMIT after that, and it > fails with

[sqlite] commit fails with no active transaction

2009-05-11 Thread Blasfamous Tshirts
Under what scenarios can commit fail with this error "no active transaction"? I have a BEGIN just before a for loop and a COMMIT after that, and it fails with this error. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Multiple counts between two tables

2009-05-11 Thread S Fiedler
This query works perfectly and responds much faster than my (SELECT COUNT(*)… approach. Thanks a lot for all your effort and help! -steffen Pavel Ivanov-2 wrote: > > Sorry, forgot END after each case, so it should look like > > SELECT > tag_name.id, > SUM(CASE WHEN tag_link.app =