Re: [sqlite] Commit fails due to "database is locked" in active transaction

2008-01-03 Thread Trevor Talbot
On 1/2/08, Lior Okman <[EMAIL PROTECTED]> wrote: > Trevor Talbot wrote: > > Requiring the second transaction to complete first is expected in > > terms of SQLIte's concurrency system. > So in terms of using SQLite, I need to close the entire transaction and > restar

Re: [sqlite] Commit fails due to "database is locked" in active transaction

2008-01-02 Thread Trevor Talbot
On 1/2/08, Lior Okman <[EMAIL PROTECTED]> wrote: > I'm using SQLite3 version 3.4.2 (latest in Debian testing and unstable), > and I have a scenario using transactions in SQLite3 that is a bit > counter-intuitive. You'll want to look at http://sqlite.org/lockingv3.html for this. > I open an

Re: [sqlite] Indexes not being used after INNER JOINS?

2008-01-01 Thread Trevor Talbot
On 12/31/07, Hugo Ferreira <[EMAIL PROTECTED]> wrote: > a) It should be completely integrated/embedded within the application; no > separate install. Just a single .DLL ;-) > b) It must have bindings with .Net 2.0 and Mono >1.2.5. > c) Open-Source. On the subject of alternatives, Firebird might

Re: [sqlite] Indexes not being used after INNER JOINS?

2007-12-31 Thread Trevor Talbot
On 12/31/07, Hugo Ferreira <[EMAIL PROTECTED]> wrote: > Yes, indeed, it is doing a sequential scan according to EXPLAIN. Still, the > slowness is unbelievable in such a small database. The whole db takes 11Mb, > and doing a LEFT JOIN between a few hundred and a few thousand of rows on a > "Core 2

Re: [sqlite] Re: SQLite and Columnar Databases

2007-12-18 Thread Trevor Talbot
On 12/18/07, Tom Briggs <[EMAIL PROTECTED]> wrote: >This implies that there are databases that provide multiple storage > mechanisms and allow users to choose between the options. Does such a > database exist? It may not be exactly what you had in mind, but see MySQL:

Re: [sqlite] Default Encoding In Sqlite

2007-12-14 Thread Trevor Talbot
I wrote: > The default storage encoding on disk is UTF-8, but it can be changed > to UTF-16 with a PRAGMA. As Igor reminds me, if you create the database file using sqlite3_open16() the default will be UTF-16 instead. You can still set it explicitly via a PRAGMA if you wish.

Re: [sqlite] Default Encoding In Sqlite

2007-12-14 Thread Trevor Talbot
On 12/14/07, Kalyani Phadke <[EMAIL PROTECTED]> wrote: > Whats default encoding in SQLite3 ? How does SQLite3 handles storing > Japanese/Chinese text in database? I know in SQL express/sql server I > have to use nVarchar/nchar/ntext datatypes to store Japanese/Chinese > text in database. It

Re: [sqlite] Re: How to check if the table has some specific values

2007-12-13 Thread Trevor Talbot
I think Joanne's example may be simplified, and the question was really more general... On 12/12/07, Joanne Pham <[EMAIL PROTECTED]> wrote: > Basiclly there is no SQL logic in SQLite. Right, there's nothing like T-SQL. Even in other databases, most procedural logic along IF..THEN lines is done

Re: [sqlite] SQLite gives Access Violation in Windows

2007-12-12 Thread Trevor Talbot
On 12/12/07, CAVALO SCHMIDT <[EMAIL PROTECTED]> wrote: > It is SQLite 3.4.2, and I downloaded the ready binary, the DLL and sqlite3.h; > I didn't compile anything. But the sqlite3.lib didn't come ready; it came as > sqlite3.def together with the DLL, then I made it into a sqlite3.lib by > using

Re: [sqlite] SQLite gives Access Violation in Windows

2007-12-12 Thread Trevor Talbot
On 12/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > "Trevor Talbot" <[EMAIL PROTECTED]> wrote: > > > test.exe: WinMain( ) + 71 > > > sqlite3.dll: sqlite3_exec( ) + 154 > > > sqlite3.dll: sqlite3_column_text( ) + 1A > >

Re: [sqlite] SQLite gives Access Violation in Windows

2007-12-12 Thread Trevor Talbot
On 12/12/07, CAVALO SCHMIDT <[EMAIL PROTECTED]> wrote: > For example, in a database where searching for text "key1" (column a) > returns "value1", "value2", "value3", and "value4" in column b, the callback > fnuction of that code would be called THREE times, returning thus three > message boxes:

Re: [sqlite] how to cast utf16 text to int?

2007-12-12 Thread Trevor Talbot
On 12/11/07, Maxim V. Shiyanovsky <[EMAIL PROTECTED]> wrote: > One more question - is there any way to insert utf-16 string from > sqlite3.exe? > As I understand I can't use syntax like this: > insert into t values (X'31003700', 1); No; the sqlite3 shell deals only in UTF-8, which is hard to

Re: [sqlite] SQLite Consortium Launches

2007-12-12 Thread Trevor Talbot
Very cool. Congratulations on getting this organized. - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Unicode support for Sqlite?

2007-12-12 Thread Trevor Talbot
On 12/12/07, Sreedhar.a <[EMAIL PROTECTED]> wrote: > I am using the sqlite to store the metadata of audio files. > Is it possible to store the metadata in unicode character format in sqlite. Yes; SQLite assumes all TEXT type data in the database is Unicode. You can work with it in UTF-8 with the

Re: [sqlite] Unicode support for Sqlite?

2007-12-12 Thread Trevor Talbot
On 12/12/07, Sreedhar.a <[EMAIL PROTECTED]> wrote: > Does Sqlite support unicode? > I have seen that it supports utf-8 and utf-16. > I want to know whether it supports unicode character formats. Unicode is a very large and complex topic, so that question is way too vague to answer. Can you

Re: [sqlite] SQLite gives Access Violation in Windows

2007-12-12 Thread Trevor Talbot
On 12/12/07, CAVALO SCHMIDT <[EMAIL PROTECTED]> wrote: > I'm programing in C, new to SQLite, in Windows, with the Pelles C Compiler > for Windows. > It works well. BUT, when I try to put this code in a Win32 application, like > inside a WinMain procedure, for example, a strange behavior happens:

Re: [sqlite] how to cast utf16 text to int?

2007-12-10 Thread Trevor Talbot
On 12/5/07, Maxim V. Shiyanovsky <[EMAIL PROTECTED]> wrote: > I have table that holds values of different types in utf16. > I also know value type for the current row. > How should I cast value to compare it with integer? > > This test shows 1 instead of 17 that I expected. > > sqlite> create

Re: [sqlite] PATCH: compound query column naming and resolving (Ticket #2822)

2007-12-10 Thread Trevor Talbot
On 12/10/07, Robert Wishlaw <[EMAIL PROTECTED]> wrote: > IBM DB2 9.5 > > select a AS "foo" from t1 union select b from t1 order by foo > SQL0206N "FOO" is not valid in the context where it is used. SQLSTATE=42703 The problem here is with the inconsistent quoting. PostgreSQL uses the opposite

Re: [sqlite] Re: Any advantages of "varchar()" over "text"?

2007-12-07 Thread Trevor Talbot
On 12/7/07, Zbigniew Baniewski <[EMAIL PROTECTED]> wrote: > On Fri, Dec 07, 2007 at 05:49:56PM -0500, Igor Tandetnik wrote: > > >So I would to ask: are there any benefits from using VARCHAR() and > > >not TEXT? > > There is no difference whatsoever to SQLite. It maintains the types for > >

Re: [sqlite] Performance tuning using PRAGMA, other methods

2007-11-30 Thread Trevor Talbot
On 11/30/07, Eduardo Morras <[EMAIL PROTECTED]> wrote: > e) I'm not sure, but using a journaling or softupdate enabled > filesystem should means you can disable syncronous pragma. No; SQLite's synchronous code ensures data reaches disk intact and in proper order at specific times, regardless of

Re: [sqlite] Undefined collation: Peculiar observations ...

2007-11-29 Thread Trevor Talbot
On 11/28/07, Ralf Junker <[EMAIL PROTECTED]> wrote: > >> Imagine that a SQLite3 database opened in a custom application with a > >> registered a collation sequence named "unknown" has created the following > >> table: > >> > >> CREATE TABLE a (b COLLATE unknown); > Trevor, I am not sure what

Re: [sqlite] ShawnMilo intro

2007-11-28 Thread Trevor Talbot
On 11/28/07, Shawn Milochik <[EMAIL PROTECTED]> wrote: > I have a couple of questions, but I am going to lurk a bit first. However, > is there an archive? I didn't receive one by e-mailing the automated help > address for this list. I'd like to see if the answers are there first. Welcome :)

Re: [sqlite] LIKE operator extremely slow? more than 10 times slower than egrep?

2007-11-28 Thread Trevor Talbot
On 11/28/07, Spiros Ioannou <[EMAIL PROTECTED]> wrote: > > egrep gets to work with a flat text file, which it can easily read > > sequentially and get optimal performance from the OS's file > > buffering/cache management. It only needs to read a piece of the file > > and scan for patterns,

Re: [sqlite] commit and rollback

2007-11-28 Thread Trevor Talbot
On 11/28/07, arbalest06 <[EMAIL PROTECTED]> wrote: > ok..thanx for that..now if process A is writing into the database, and > process B attempts to write, does sqlite take note of B's attempt and gives > the permission to B when A is done? like would it be a queue that the first > process that

Re: [sqlite] LIKE operator extremely slow? more than 10 times slower than egrep?

2007-11-27 Thread Trevor Talbot
On 11/27/07, Spiros Ioannou <[EMAIL PROTECTED]> wrote: > I had a 135MB, 1256132 lines, '@' separated text file containing > various words and text fields (like a dictionary). > Example record: > [EMAIL PROTECTED]@[EMAIL PROTECTED],[EMAIL PROTECTED] altana : μικρός > ανθόκηπος - εξώστης, >

Re: [sqlite] Undefined collation: Peculiar observations ...

2007-11-27 Thread Trevor Talbot
On 11/25/07, Ralf Junker <[EMAIL PROTECTED]> wrote: > Imagine that a SQLite3 database opened in a custom application with a > registered a collation sequence named "unknown" has created the following > table: > > CREATE TABLE a (b COLLATE unknown); > > Now open this table in the default

Re: [sqlite] commit and rollback

2007-11-26 Thread Trevor Talbot
On 11/26/07, arbalest06 <[EMAIL PROTECTED]> wrote: > John Stanton-3 wrote: > > All you need to do is to test the returned status of your sqlite3_step > > calls and if you get an error launch an SQL statement "ROLLBACK" and > > bail out of the transaction. If there are no errors you complete

Re: [sqlite] Optimizing Application - SQLite Connection Creation/Sharing

2007-11-23 Thread Trevor Talbot
On 11/23/07, Sabyasachi Ruj <[EMAIL PROTECTED]> wrote: > I have an application that uses SQLite extensively. > In a part of that application, I need to do the following steps:- > 1. I need to create a thread per request basis. > 2. Open SQLite connection. > 3. Then

Re: [sqlite] Sqlite version for libc 2.1.3

2007-11-22 Thread Trevor Talbot
On 11/22/07, Tara_Nair <[EMAIL PROTECTED]> wrote: > I just recently started to use Sqlite3 version 3.5.2 on an ARM-LINUX > based embedded platform. > Sqlite3-v3.5.2. has a dependency on libc, ld and libpthread versions 2.2.3. Er.. it should depend on whatever versions you link it against when

Re: [sqlite] Memory Usage

2007-11-19 Thread Trevor Talbot
On 11/19/07, John Stanton <[EMAIL PROTECTED]> wrote: > Joe Wilson wrote: > > If a C program employs perfect 1:1 malloc'ing to free'ing, i.e., has no > > memory leaks, then garbage collection is irrelevant to the topic of > > memory fragmentation. It's not like C can employ a copying garbage > >

Re: [sqlite] Memory Usage

2007-11-19 Thread Trevor Talbot
On 11/19/07, John Stanton <[EMAIL PROTECTED]> wrote: > Malloc is a concept implemented in various ways, some more successful > than others but all of them hidden from the programmer. Free tries to > give back memory but as you can appreciate unless you use some garbage > collection scheme with

Re: [sqlite] returning Blobs in an oldstyle query ...

2007-11-19 Thread Trevor Talbot
On 11/19/07, Rob Sciuk <[EMAIL PROTECTED]> wrote: > When using the sqlite3_query command, and a callback function, is there a > way of getting the _*STATEMENT*_ for the query string which is currently > executing, reliably from the sqlite3 *opaque type?? No. sqlite3_exec() is simply a wrapper

Re: [sqlite] Re: Threads

2007-11-14 Thread Trevor Talbot
On 11/14/07, John Stanton <[EMAIL PROTECTED]> wrote: > Threads simulated in software are a kludge to better utilize current > processor and operating system architectures. In time machines where > the parallelism is handled in hardware will be more widely available and > the threading will be

Re: [sqlite] suggestion on improving performance on UPDATE

2007-11-13 Thread Trevor Talbot
On 11/13/07, Benilton Carvalho <[EMAIL PROTECTED]> wrote: > Then each column is added on the fly, using: > > ALTER TABLE table ADD COLUMN colunm REAL; > > The columns in then filled used UPDATE as described previously. I haven't investigated the storage layout of this, but from what the docs

Re: [sqlite] Request for help with the SQLite Website

2007-11-13 Thread Trevor Talbot
On 11/13/07, Joe Wilson <[EMAIL PROTECTED]> wrote: > If you use the idiom whereby each thread solely takes its tasks > from a thread-safe work queue, you can have a clear separation of > responsibilities and minimal or preferably no shared-state between > threads. You get concurrency as a side

Re: [sqlite] suggestion on improving performance on UPDATE

2007-11-13 Thread Trevor Talbot
On 11/13/07, John Stanton <[EMAIL PROTECTED]> wrote: > The point is that the more statements you have in each transaction the > better, up to a limit of perhaps a thousand or so. Actually, I get the impression that number of statements is not really the problem here. On 11/13/07, Benilton

Re: [sqlite] Data encryption

2007-11-12 Thread Trevor Talbot
On 11/12/07, Andreas Volz <[EMAIL PROTECTED]> wrote: > I think about to encrypt the data in my DB. Does sqlite offer a data > encryption on a lower level? Or should I encrypt my data before putting > it into the table on a higher level in my application without involving > sqlite? Dr. Hipp sells

Re: [sqlite] Re: a TRIGGER to create a VIEW ? (newbie)

2007-11-12 Thread Trevor Talbot
On 11/12/07, Andreas <[EMAIL PROTECTED]> wrote: > Am 12.11.2007 um 14:40 schrieb Igor Tandetnik: > > I wonder - do you have any plans to eventually drop some of these > > views? Or are you just going to keep creating them, exploding the > > size of the database schema? In fact, why on earth do

Re: [sqlite] Read and write in SQLite

2007-11-09 Thread Trevor Talbot
On 11/9/07, Joanne Pham <[EMAIL PROTECTED]> wrote: > I have an application to writh to database with begin transaction and end > transaction. > Before end transaction another application try to connect to the database to > read the data and in the middle of the read of the second application >

Re: [sqlite] Read and write in SQLite

2007-11-09 Thread Trevor Talbot
On 11/9/07, Joanne Pham <[EMAIL PROTECTED]> wrote: > I knew that SQLite doesn't allow concurrency for both read and write at the > same time. > My application is written in C++ so Is there any way that we can check if > there is any connection to the database so the second connection needs to

Re: [sqlite] Suggests for improving the SQLite website

2007-11-09 Thread Trevor Talbot
On 11/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I put up 4 variations. Please, everyone, offer your opinions: > >(1) http://sqlite.hwaci.com/v1/ No CSS of any kind. >(2) http://sqlite.hwaci.com/v2/ CSS menus with rounded corners >(3) http://sqlite.hwaci.com/v3/

Re: [sqlite] Suggests for improving the SQLite website

2007-11-08 Thread Trevor Talbot
The documentation page is too scattered, and needs to be categorized: short bits, like the intro and features lists; reference material, like the SQL syntax and API pages; and detailed discussion, like the locking methods and the like. I echo P Kishor's comment that the date/time functions need

Re: [sqlite] Disk caching impacts performance.

2007-11-08 Thread Trevor Talbot
On 11/8/07, Julien Renggli <[EMAIL PROTECTED]> wrote: > As I said, the "nasty" trick works and we'll live with it (writing our > own FileSystem is not an option). We would just like to understand > better what's happening, to know why and when the "first run" is so much > slower. And should we

Re: [sqlite] Is possible put a password in database ?

2007-11-08 Thread Trevor Talbot
On 11/8/07, Jonas Sandman <[EMAIL PROTECTED]> wrote: > How much is it for the encrypted version? The info on that is here: http://www.hwaci.com/sw/sqlite/prosupport.html - To unsubscribe, send email to [EMAIL PROTECTED]

Re: [sqlite] Is possible put a password in database ?

2007-11-08 Thread Trevor Talbot
On 11/8/07, paulito santana <[EMAIL PROTECTED]> wrote: > is possible i put a password in the file that represents a SQLite database > ?? There is any instruction in SQLite command line that allows this ? No. drh sells a version of SQLite with encryption support, and some others maintain their

Re: [sqlite] Re: Transactions on a shared database connection

2007-11-06 Thread Trevor Talbot
On 11/6/07, John Firebaugh <[EMAIL PROTECTED]> wrote: > > You're confusing threads with the context of the connection. When you > > call sqlite3_open() you get a single connection to a db. That > > connection can then be used across threads, but it is for all intents > > and purposes a single

Re: [sqlite] Affinity modes

2007-11-04 Thread Trevor Talbot
On 11/4/07, Ken <[EMAIL PROTECTED]> wrote: > In order to maximize compatibility between SQLite and other database > engines, SQLite support the concept of "type affinity" on columns. The type > affinity of a column is the recommended type for data stored in that column. > The key here is

Re: [sqlite] Problem using POSIX semaphores and triggers to signal updates

2007-11-02 Thread Trevor Talbot
On 10/31/07, Bill Gatliff <[EMAIL PROTECTED]> wrote: > Trevor Talbot wrote: > > If your platform has a file modification notification mechanism, you > > may be able to sleep on that instead. Of course the problem with this > > approach is that it's only a coarse

Re: [sqlite] How many virtual table implemenations are there out there?

2007-11-02 Thread Trevor Talbot
Terms like "foreign" and "federated" conjure up images of physical tables that reside in external databases, which is not at all what this feature is. It's simply an interface that looks like a table. - To unsubscribe,

Re: [sqlite] Problem using POSIX semaphores and triggers to signal updates

2007-10-31 Thread Trevor Talbot
On 10/31/07, Bill Gatliff <[EMAIL PROTECTED]> wrote: > My application is a mobile platform with a GUI that wants to display > frequently-updated data in a database. The GUI is a separate process > from the one providing the data, and is one of several consumers of that > data. > I prefer not to

Re: [sqlite] DB managers that do searches?

2007-10-30 Thread Trevor Talbot
To help the conversation along a bit, phpMyAdmin is a web-based administrative and design interface for MySQL. I don't use it so I don't know exactly what kind of searching the OP is looking for either, but at least we know the type of tool :)

Re: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Trevor Talbot
I wrote: > On 10/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > On win32, we have to initialize mutexes at run-time, but this > > can be done within a contrived mutex that we build off of > > a static integer using InterlockedIncrement(). And mutex > > initialization apparently never

Re: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Trevor Talbot
On 10/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On win32, we have to initialize mutexes at run-time, but this > can be done within a contrived mutex that we build off of > a static integer using InterlockedIncrement(). And mutex > initialization apparently never fails on win32, so we

Re: [sqlite] Race condition -- fixed?

2007-10-29 Thread Trevor Talbot
I wrote: > I would still perform rollbacks for any errors other than the above > expected SQLITE_BUSY cases, of course, since they indicate something > else went wrong (such as running out of disk space). I think it's > safe to say those are all unusual cases though. Hmm,

Re: [sqlite] Race condition -- fixed?

2007-10-29 Thread Trevor Talbot
On 10/29/07, Richard Klein <[EMAIL PROTECTED]> wrote: > Perhaps the best solution is to follow these rules: > > IF THE TRANSACTION IS A WRITER (i.e. will eventually write to the db): > -- > (1) Begin the transaction with 'BEGIN

Re: [sqlite] Race condition -- fixed?

2007-10-29 Thread Trevor Talbot
On 10/29/07, Richard Klein <[EMAIL PROTECTED]> wrote: > But am I correct in assuming that one way that SQLite provides > serializable transactions is by automatically rolling back > transactions when necessary (and returning SQLITE_IOERR)? No. That will happen in some specific unavoidable

Re: AW: AW: [sqlite] INSERT OR IGNORE and sqlite3_last_insert_rowid()

2007-10-28 Thread Trevor Talbot
On 10/28/07, Michael Ruck <[EMAIL PROTECTED]> wrote: > I'd suggest putting this into the documentation of > sqlite3_last_insert_rowid(), that > the call is not reliable in scenarios such as this one. It might be appropriate to just stress it only works for successful INSERTs. I'd just assumed

Re: [sqlite] Race condition -- fixed?

2007-10-26 Thread Trevor Talbot
On 10/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > This is true of SQLite because isolation in SQLite > is "SERIALIZABLE". This is the highest level of isolate > provided by SQL. Most client/server database engines > by default implement "READ COMMITTED". The value of > "balance"

Re: [sqlite] Race condition -- fixed?

2007-10-25 Thread Trevor Talbot
On 10/25/07, Richard Klein <[EMAIL PROTECTED]> wrote: > Trevor Talbot wrote: > > The thing is, SQLite's synchronization mechanism is simpler than most > > full-featured SQL databases. In all cases, the point is that if you > > are attempting to do simultaneous writes

Re: [sqlite] Race condition -- fixed?

2007-10-25 Thread Trevor Talbot
The thing is, SQLite's synchronization mechanism is simpler than most full-featured SQL databases. In all cases, the point is that if you are attempting to do simultaneous writes from two connections, each connection must be prepared to receive an error, rollback the transaction, and try again.

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-17 Thread Trevor Talbot
On 10/17/07, Uma Krishnan <[EMAIL PROTECTED]> wrote: > As far as I know, Postgres does not have a virtual engine. I could be wrong. It's not a virtual machine style, where it has a specific instruction set; instead it's more like a graph of operations. Execution means walking a graph instead of

Re: [sqlite] HELP WITH SQLITE INTERNALS - VDBE and Virtual tables

2007-10-17 Thread Trevor Talbot
On 10/17/07, Uma Krishnan <[EMAIL PROTECTED]> wrote: > One other question, when a query is issued, does SQLite cache the results, so > that future queries can be processed off the cache (I think not) Like the "query cache" in some other databases? No. SQLite does have a cache of database

Re: [sqlite] Accessing external applications from within SQLite triggers

2007-10-13 Thread Trevor Talbot
A couple other things come to mind here, that might be relevant to what you're doing: * A trigger that has a "final" side effect, like signaling another process, will both have that effect early (before the transaction is committed), and will have that effect even if the transaction is later

Re: [sqlite] Accessing external applications from within SQLite triggers

2007-10-13 Thread Trevor Talbot
On 10/13/07, Vladimir Stokic <[EMAIL PROTECTED]> wrote: > I tried to do what you and Igor said, but I found out that it does not really > work that way. I can make a user-defined function, but it stays active only > while the current connection is open. It is not persisted in the "database". >

Re: [sqlite] What is RESERVED state for?

2007-10-12 Thread Trevor Talbot
On 10/12/07, Richard Klein <[EMAIL PROTECTED]> wrote: > (1) Can more than one process have a PENDING > lock on a database? (I'm guessing that the > answer is "no". My guess is that if one > process has a PENDING lock on a database, > then all the other processes that have > opened that database

Re: [sqlite] many-one relation

2007-10-08 Thread Trevor Talbot
I wrote: > On 10/8/07, chetana bhargav <[EMAIL PROTECTED]> wrote: > > >> Is this a garbage collection situation, where you want a row in B to go > > >> away when all referring rows in A are deleted? > > > > Yes exactly this is what I wanted :) > Maintaining a reference count in table B may be

Re: [sqlite] many-one relation

2007-10-08 Thread Trevor Talbot
On 10/8/07, chetana bhargav <[EMAIL PROTECTED]> wrote: > >> Is this a garbage collection situation, where you want a row in B to go > >> away when all referring rows in A are deleted? > > Yes exactly this is what I wanted :) Okay. A trigger on table A can accomplish it without any extra

Re: [sqlite] many-one relation

2007-10-08 Thread Trevor Talbot
On 10/8/07, chetana bhargav <[EMAIL PROTECTED]> wrote: > We got two tables, tableA & tableB. > > tableB is turning out to be a many-one relation where in we have many rows of > tableA mapping to one row of tableB, would like to know what is the best way > to delete a row in tableB > > 1. Keep a

Re: [sqlite] Problems with SQLite and PHP

2007-10-08 Thread Trevor Talbot
On 10/8/07, Markus Wolff - NorthClick <[EMAIL PROTECTED]> wrote: > I find this to be a bit irritating - shouldn't it be enough that the > server can dive into that subdir and find a file it can actually write > to within the dir? How does it make sense that the entire directory > containing the

Re: [sqlite] Threads in 3.5.0

2007-10-04 Thread Trevor Talbot
On 10/4/07, Michael Scharf <[EMAIL PROTECTED]> wrote: > The difference is: with threads you have to take action to > protect your data structures from being accessed by other > threads. With multiple processes, you have to take action to > access the data of the other process. That *is* a

Re: [sqlite] Threads in 3.5.0

2007-10-04 Thread Trevor Talbot
On 10/4/07, Jonas Sandman <[EMAIL PROTECTED]> wrote: > Well I am certainly a newbie in this context, threads must certainly > be used when writing Windows application since you are not at liberty > to splinter your process like you can on a *nix based system, no? It's just that the classic Unix

Re: [sqlite] SQLite and html character entities

2007-09-21 Thread Trevor Talbot
I should also mention, a text editor I like to use is SubEthaEdit (I have the old 2.2 version), and it supports switching encodings via the Format menu. If you're switching to find the encoding of an existing file, just choose Reinterpret when it asks.

Re: [sqlite] SQLite and html character entities

2007-09-21 Thread Trevor Talbot
On 9/20/07, P Kishor <[EMAIL PROTECTED]> wrote: > On 9/20/07, Trevor Talbot <[EMAIL PROTECTED]> wrote: > > On 9/20/07, P Kishor <[EMAIL PROTECTED]> wrote: > > > Lucknow:~/Data/ecoservices punkish$ less foo.csv > > > "the first record&quo

Re: [sqlite] SQLite and html character entities

2007-09-20 Thread Trevor Talbot
On 9/20/07, P Kishor <[EMAIL PROTECTED]> wrote: > sqlite> select * from tbl; > the first record > é ç ñ î > more from 3rd row > row four > these "volunteered" activities > <á ø ã ü î & others> > - > sqlite> .mode csv > sqlite> .output foo.csv > sqlite> select * from

Re: [sqlite] Error in SQLITE on applyNumericAffinity

2007-09-16 Thread Trevor Talbot
On 9/12/07, Stéphane Thiers <[EMAIL PROTECTED]> wrote: Somehow I missed replying earlier, sorry about that. > The column which contains these numbers is > declared as REAL. This raises another question to > me: I thought that the numbers were stored as > strings, so why sqlite would try to

Re: [sqlite] Multi-User confusion

2007-09-16 Thread Trevor Talbot
On 9/16/07, Zbigniew Baniewski <[EMAIL PROTECTED]> wrote: > I've found a remark regarding write concurrency in SQLite: > > "All SQLite write operations obtain an exclusive lock on the whole database" > ( http://www.mail-archive.com/sqlite-users@sqlite.org/msg18342.html ) > > Doesn't it mean, that

Re: [sqlite] Error in SQLITE on applyNumericAffinity

2007-09-12 Thread Trevor Talbot
On 9/12/07, Stéphane Thiers <[EMAIL PROTECTED]> wrote: > I got this stack error in SQLITE when executing the following request: I assume there's an exception that goes with this; what is it? > "INSERT INTO _scalars_float > VALUES(237,220,'ComputedNoise','Noise','Noise > level estimated by the

Re: [sqlite] Can I simulate a COMMIT?

2007-09-08 Thread Trevor Talbot
On 9/7/07, Yves Goergen <[EMAIL PROTECTED]> wrote: > I'm currently using a transaction for this on the database side and > rolling it back if the file cannot be deleted. But what if the file is > gone and then SQLite says it doesn't accept my records? Since we're > inside a transaction, integrity

Re: [sqlite] how to iterate on SELECT query results

2007-09-03 Thread Trevor Talbot
On 9/3/07, Babu, Lokesh <[EMAIL PROTECTED]> wrote: > After doing some SELECT operation on a TABLE, say we get 100 result > items out of 1000 records, Is there any way where I can iterate > through this result set. i.e., Get N items out of 100, say get > previous 10, get next 10, etc, > > This

Re: [sqlite] why a VIEW doesn't contain a ROWID

2007-09-03 Thread Trevor Talbot
On 9/2/07, Babu, Lokesh <[EMAIL PROTECTED]> wrote: > Why a VIEW doesn't contain a ROWID field. Even though if it is > accessed, it contains (null) value. How to initialise this or how to > make it work as in TABLE. The rowid field exposes SQLite's internal storage mechanism for table rows. It

Re: [sqlite] Difference between OR and IN [http://www.sqlite.org/php2004/page-052.html]

2007-09-02 Thread Trevor Talbot
On 9/2/07, RaghavendraK 70574 <[EMAIL PROTECTED]> wrote: > select * from test where column in > ('98451234','9845123','984512','98451', > '9845','984','98','9','-1') limit 1; > > even when limit 1 is provided it continues to search. Continues to search in what way? What exactly are you looking

Re: [sqlite] Difference between OR and IN [http://www.sqlite.org/php2004/page-052.html]

2007-09-01 Thread Trevor Talbot
On 9/1/07, RaghavendraK 70574 <[EMAIL PROTECTED]> wrote: > I want to know why > prepareStatement: select * from xxx where IN (?); > stmt.bind("abc,xyz,123"); is not supported for multiple > values. It's not supported because it doesn't make sense. The parametric binding mechanism is for single

Re: [sqlite] sqlite3 Database Pointer multithreading / concurrency

2007-08-30 Thread Trevor Talbot
On 8/29/07, Ben Mann <[EMAIL PROTECTED]> wrote: > The problem is that connection A is calling a function which is attempting > to open a new SHARED connection. Since it can't (B's PENDING prevents this, > because of A's earlier SHARED connection), A blocks. > > If instead, A does not open a new

Re: [sqlite] Skype client using SQLite?

2007-08-28 Thread Trevor Talbot
On 8/28/07, Jeremy Hinegardner <[EMAIL PROTECTED]> wrote: > On Tue, Aug 28, 2007 at 03:13:47PM +, [EMAIL PROTECTED] wrote: > > In reference to > > > >http://www.sqlite.org/cvstrac/tktview?tn=2592 > > > > This is the first public indication we have had that > > Skype is using SQLite in

Re: [sqlite] Re: Re: Re: SQLite3 Concurrency

2007-08-26 Thread Trevor Talbot
You're confused about the locking; see http://sqlite.org/lockingv3.html On 8/26/07, John Stanton <[EMAIL PROTECTED]> wrote: > How about the case of: > BEGINsets reserved lock on thread one No lock. > SELECT promotes lock to shared on thread one Thread one acquires SHARED lock. >

Re: [sqlite] Locking queries

2007-08-24 Thread Trevor Talbot
On 8/23/07, Pavan <[EMAIL PROTECTED]> wrote: > As per my understanding I see that SQLite supports only database locking, as > opposed to table/row locking. Does anyone know if you can read from a locked > database ? (i.e. if one application has locked the database for writing, > then can another

Re: [sqlite] Re: Aggregate and query limit

2007-08-19 Thread Trevor Talbot
On 8/19/07, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > http://archives.devshed.com/forums/showpost.php?p=5772144=8 I've seen some interesting things out of web forums and mailing list gateways, but having all of the capital 'O's go missing is a new one...

Re: [sqlite] Odd error on "BEGIN IMMEDIATE"

2007-08-17 Thread Trevor Talbot
On 8/17/07, Scott Derrick <[EMAIL PROTECTED]> wrote: > exec a "BEGIN IMMEDIATE", with a sleep loop if I can't acquire the > reserved lock. > > Then prepare, step, finalize, exit the function > > When I come back into the function and exec a "BEGIN IMMEDIATE" I get an > error > > "Cannot start a

Re: [sqlite] ~/sqliterc example/documentation avaible?

2007-08-11 Thread Trevor Talbot
On 8/11/07, Joe Wilson <[EMAIL PROTECTED]> wrote: > You can put any command seen in ".help" in the sqlite3 shell > or any SQL command in ~/.sqliterc, such as: ...and of course, I would completely forget about the shell. Oops.

Re: [sqlite] ~/sqliterc example/documentation avaible?

2007-08-10 Thread Trevor Talbot
On 8/10/07, Brickl Roland <[EMAIL PROTECTED]> wrote: > where can i find information about how the config-file should look like and > what is possible? There is no ~/sqliterc or config file. SQLite is an embedded database engine; applications use it in application-specific ways.

Re: [sqlite] FW: Security Problem C/C++

2007-08-06 Thread Trevor Talbot
On 8/6/07, Severin Müller <[EMAIL PROTECTED]> wrote: > I'm trying to use SQLite3 for my File, because I thinks it's a great API and > easy to use. But I'm having trouble to use the library properly. > When i run the Program, I get get the following Error: > Unhandled exception… so its some kind

Re: [sqlite] a c++ newbie question

2007-08-06 Thread Trevor Talbot
On 8/5/07, Stephen Sutherland <[EMAIL PROTECTED]> wrote: > I am trying to treat a string before passing it through my SQL statement > into the database. > > I know that a single apostrophe will break the SQL statement. > So I have to replace them all to double apostrophes. > But are

Re: [sqlite] CREATE INDEX that is case insensitive?

2007-07-30 Thread Trevor Talbot
On 7/30/07, Chase <[EMAIL PROTECTED]> wrote: > Right now, when i do a select in sqlite that is supposed to be in > alphabetical order, i get: > > DC > Da > De > Do > We ultimately will be creating an index for this column anyway, so > let's just jump ahead and talk about creating an INDEX which

Re: [sqlite] how do i generate a uniqueidentifier ?

2007-07-27 Thread Trevor Talbot
Hm, something ate the last part of my message... > Note that SQLite contains a decent PRNG which is well seeded, > if you are running on Mac or Linux. (We need to work on better > seeding on Win32...) The crypto framework on recent versions of Windows can be used to get a good quality seed.

Re: [sqlite] how do i generate a uniqueidentifier ?

2007-07-27 Thread Trevor Talbot
On 7/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > "Trevor Talbot" <[EMAIL PROTECTED]> wrote: > > > > > > sqlite> select "{" || hex(randomblob(4)) || "-" || hex(randomblob(2)) > > > > || "-"

Re: [sqlite] how do i generate a uniqueidentifier ?

2007-07-27 Thread Trevor Talbot
On 7/27/07, Chase <[EMAIL PROTECTED]> wrote: > hhmmm... i just noticed something weird. if i insert a string of ANY > length or format into the uniqueidentifier field, sqlite allows it... > so i guess it's just a text type under the hood with no rules enforced > on the format of the string

Re: [sqlite] problem with date/time

2007-07-26 Thread Trevor Talbot
On 7/26/07, JJ <[EMAIL PROTECTED]> wrote: Hi, I've solved the problem at last. One thing I didn't know that creating DirectX device will lower float point precision, it is written in their documentation... So creating DX app and running float calculations is no, no... :) Ah, interesting.

Re: [sqlite] Is this SQL command supported?

2007-07-24 Thread Trevor Talbot
On 7/24/07, Ahmed Sulaiman <[EMAIL PROTECTED]> wrote: That's a real pumper. How do you alter constraints on existing tables ??! You can't. You would need to create a new table with the desired constraints, copy the data into it, drop the old table, and rename the new one. alter table

Re: [sqlite] problem with date/time

2007-07-24 Thread Trevor Talbot
On 7/24/07, JJ <[EMAIL PROTECTED]> wrote: Yes it were returning same number all the time, I've broke down calculations of UTC to Julian date type and saw significant floating point errors (rounding) in calculation, it couldn't hold such numbers and to me seemed to ignore double data type,

Re: [sqlite] Is this SQL command supported?

2007-07-24 Thread Trevor Talbot
On 7/24/07, Ahmed Sulaiman <[EMAIL PROTECTED]> wrote: I wonder if there any SQL commands that are not supported by SQLite. I am trying to read an entire DDL script file as a string and pass it as one SQL command to SQLite. The same script worked fine in Firebird batch execution. But with SQLite

  1   2   >