[sqlite] help in triggers(calling functions)

2006-03-18 Thread Chethana, Rao \(IE10\)
Hello! How do I call functions(user defined) or stored procedures from triggers in sqlite? For example, how do I do this in sqlite? CREATE TRIGGER TrgIns_PTable AFTER INSERT ON PTable FOR EACH ROW EXECUTE PROCEDURE PP_InsPTable(); Please do reply

RE: [sqlite] "bind or column index out of range" when using :AAA notation?

2006-03-18 Thread Boris Popov
Sigh, that one is my bad, please ignore. Everything works as advertised. Cheers! -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 [EMAIL PROTECTED] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header.

[sqlite] "bind or column index out of range" when using :AAA notation?

2006-03-18 Thread Boris Popov
In the following prepared statement, SELECT * FROM STUFF WHERE ID = :2 OR ID = :17 Trying to determine index of ":17" via sqlite3_bind_parameter_index results in 'bind or column index out of range' exception. Am I misreading the docs again? ;) Quote: "... one or more literals can be replace by

[sqlite] multiple queries, one thread

2006-03-18 Thread Tim Larson
Since multi-threading issues are notoriously troublesome, usually deciding to wait to appear until the software is deployed and under heavy load... Is there a way to have multiple (perhaps only "select"?) queries running at the same time from a single thread? This would allow the OS to schedule

Re: [sqlite] db timings [was: concers about database size]

2006-03-18 Thread drh
Daniel Franke <[EMAIL PROTECTED]> wrote: > > CREATE TABLE genotypes (markerid integer NOT NULL REFERENCES marker(id), > individualid integer NOT NULL REFERENCES individuals(id), > genA integer, > genB integer) > > CREATE UNIQUE INDEX genotypeidx ON genotypes(markerid,

Re: [sqlite] Hot Backups

2006-03-18 Thread drh
"Brandon, Nicholas (UK)" <[EMAIL PROTECTED]> wrote: > > While the database won't be under heavy utilisation, I would like to ensure= > that the database file is not corrupted during the copy, therefore I plan= > to do the following: > > 1. Connect to database and issue a BEGIN IMMEDIATE > 2.

[sqlite] db timings [was: concers about database size]

2006-03-18 Thread Daniel Franke
At Thursday I wrote: > Since there's so much interest in this, I'll submit a couple of timings as > soon as possible =) Here they are: -- System: P4 2.4Ghz, 1GB RAm, 4GB swap --

[sqlite] Hot Backups

2006-03-18 Thread Brandon, Nicholas (UK)
For simple databases (say 10's of MB), I assume the safest way of backing up the database is to copy the file. For a modern desktop/server, this should take less than 20 seconds or so. While the database won't be under heavy utilisation, I would like to ensure that the database file is not

[sqlite] case insensitive index

2006-03-18 Thread Cory Nelson
Is this possible? I want to index a column so doing col = 'cAt' will match with 'cat'. -- Cory Nelson http://www.int64.org

Re: [sqlite] Query parsing differences between v3.2.x and v3.3.x

2006-03-18 Thread Joe Wilson
Ah.. okay - you did not mention tables t1 and t2 were in different database files. That is likely why this case was never tested. Explicit cross joins are the way to go - you know the data better than the database. Read about SQLite's CROSS JOIN logic here:

Re: [sqlite] Database from scratch

2006-03-18 Thread drh
Robert Bielik <[EMAIL PROTECTED]> wrote: > I'm using the ODBC driver for SQL and I want to create a SQLite 3 db > from scratch, i.e. open a transaction, use DDL to create > tables and inserts to insert data into the tables, then commit. It seems > to work (i.e. a file is created and it has a

Re: [sqlite] varchar(20) column reported as SQLITE_NULL?

2006-03-18 Thread drh
"Boris Popov" <[EMAIL PROTECTED]> wrote: > While executing 'SELECT REGION FROM EMPLOYEE' I came across a column that is > SQLITE_NULL as far as sqlite3_column_type is concerned, but really is > varchar(20) if you ask for sqlite3_column_decltype? Is varchar(20) illegal > in SQLite? Certainly looks

[sqlite] Database from scratch

2006-03-18 Thread Robert Bielik
I'm using the ODBC driver for SQL and I want to create a SQLite 3 db from scratch, i.e. open a transaction, use DDL to create tables and inserts to insert data into the tables, then commit. It seems to work (i.e. a file is created and it has a reasonable size). However, when trying to open the