Re: [sqlite] Mozilla + SQLite?

2005-07-07 Thread Vladimir Vukicevic
On Wed, 2005-07-06 at 08:40 -0700, Scott Baker wrote: > Looks like Firefox is gearing up to store some of its information in > SQLite? Does anyone know anything more about this? > > http://gemal.dk/blog/2005/07/06/mozilla_firefox_bookmarks_in_for_a_rewrite/ We'll be using sqlite, but not directly

Re: [sqlite] SQLITE_SCHEMA and statement parameters

2005-04-22 Thread Vladimir Vukicevic
On 4/22/05, Jan-Eric Duden <[EMAIL PROTECTED]> wrote: > I use the sqlite3_expired api - which is only documented in the > sqlite3.h header. > Unfortunately it is considered an experimental API. Huh, I never noticed that function in the header -- thanks for pointing it out! It looks like the call

Re: [sqlite] SQLITE_SCHEMA and statement parameters

2005-04-21 Thread Vladimir Vukicevic
On 4/21/05, D. Richard Hipp <[EMAIL PROTECTED]> wrote: > How about sqlite3_transfer_bindings(). So if you get an > SQLITE_SCHEMA error you rerun sqlite3_prepare() to get > a new sqlite3_stmt, then call sqlite3_transfer_bindings() > to transfer bindings from the old statement over to the > new

Re: [sqlite] SQLITE_SCHEMA and statement parameters

2005-04-21 Thread Vladimir Vukicevic
On 4/21/05, D. Richard Hipp <[EMAIL PROTECTED]> wrote: > So when the schema changes, it is not a matter of changes > a few bits and pieces of the VM. The VM must be completely > reconstructed. Its a complete do-over. Yep, I guess what I'm suggesting is just doing that reconstruction internally

Re: [sqlite] SQLITE_SCHEMA and statement parameters

2005-04-21 Thread Vladimir Vukicevic
t; Changing the schema of a running system is bad news. > Shouldn't your schema be thought out carefully before you write code? > Even if the design changes after you implement the changes should be > thought out and a transition planned. As the old joke goes > "Doctor! Doctor! It hurts when I.

[sqlite] SQLITE_SCHEMA and statement parameters

2005-04-21 Thread Vladimir Vukicevic
Right now it's quite difficult to implement any kind of higher-level wrapper over sqlite3_prepare()/sqlite3_step()/etc., because of the semantics of the SQLITE_SCHEMA error. If you bind values to parameters of a sqlite3_stmt, you have to redo that binding after you recreate the sqlite3_stmt due

[sqlite] implementing ALTER TABLE .. ADD COLUMN

2005-02-10 Thread Vladimir Vukicevic
It seems that after ALTER TABLE .. RENAME TO, ADD COLUMN is probably the most common, probably followed by DROP COLUMN. I'd like to take a crack at adding support for ADD COLUMN. It seems that I can do this via VDBE -- it seems similar to doing an UPDATE across the entire table, reading the

Re: [sqlite] How are NULL values deleted?

2004-10-27 Thread Vladimir Vukicevic
You need to use "IS NULL" as opposed to "= NULL". - Vlad On Thu, 28 Oct 2004 00:55:39 +0200, Tito Ciuro <[EMAIL PROTECTED]> wrote: > Hello, > > I'd like to remove all rows with a specific column equaling NULL. I've > tried this: > > SQLite version 3.0.8 > Enter ".help" for instructions >

Re: [sqlite] a bunch of questions about SQLite from new user

2004-10-26 Thread Vladimir Vukicevic
I can take a crack at some of these... On Tue, 26 Oct 2004 23:17:00 -0500, Tom <[EMAIL PROTECTED]> wrote: > 1. sqlite3_prepare( > sqlite3 *db, > const char *zSql, > int nBytes, > sqlite3_stmt **ppStmt, > const char

Re: [sqlite] Parameterized queries -- howto?

2004-10-20 Thread Vladimir Vukicevic
On Wed, 20 Oct 2004 17:19:47 -0700 (PDT), Ron Aaron <[EMAIL PROTECTED]> wrote: > On Wed, October 20, 2004 15:35, Vladimir Vukicevic said: > > No; there is no way to create a stored query only within sql; there's > > no place to actually store it. So using parameters doesn

Re: [sqlite] Parameterized queries -- howto?

2004-10-20 Thread Vladimir Vukicevic
On Wed, 20 Oct 2004 15:15:44 -0700 (PDT), Ron Aaron <[EMAIL PROTECTED]> wrote: > Thanks. I know it can be done in the C API, that was not the question. The > question was, can it be done *using SQL* ? No; there is no way to create a stored query only within sql; there's no place to actually

Re: [sqlite] Upgrading databases from sqlite2 and sqlite3 failed when new database same name, sqlite version 3 databases not able to view in sqlite explorer HELP

2004-10-07 Thread Vladimir Vukicevic
On Thu, 07 Oct 2004 16:13:48 -0400, Steve Frierdich <[EMAIL PROTECTED]> wrote: > I downloaded sqlite3.exe to perform an upgrade of a database from > version 2 to version 3. > When I upgraded a version 2 database to a version 3 database with the > same name the operation failed.The upgrade failed

Re: [sqlite] calling sqlite3_create_function after sqlite3_prepare?

2004-09-28 Thread Vladimir Vukicevic
On Tue, 28 Sep 2004 12:09:45 +0100 (BST), Christian Smith <[EMAIL PROTECTED]> wrote: > Why? > > Functions are static, you set them up at initialisation time. So why > register functions after preparing a statement for execution. A single database handle is getting shared among multiple

[sqlite] Re: calling sqlite3_create_function after sqlite3_prepare?

2004-09-27 Thread Vladimir Vukicevic
Any ideas on this? Seems to be another problem here as well -- sqlite3_errcode is often not returning the same error code as was returned by a previous sqlite3 call. I've filed tickets #926 and #927 for these issues, along with a code sample demonstrating the problem. Thanks, - Vlad

[sqlite] calling sqlite3_create_function after sqlite3_prepare?

2004-09-24 Thread Vladimir Vukicevic
I'm creating a few prepared statements using sqlite3_prepare; making that call seems to set db->pVdbe to the newly compiled statement, which seems reasonable. However, calling sqlite3_create_function after this results in SQLITE_ERROR, with an error message indicating that the library functions

Re: [sqlite] sqlite3 and statement variables

2004-09-23 Thread Vladimir Vukicevic
On Wed, 22 Sep 2004 22:53:19 -0700, Darren Duncan <[EMAIL PROTECTED]> wrote: > The documentation for SQLite 3 is very much out of date and needs to > be rewritten. In fact, a lot of the site documentation still refers > to SQLite 2. So you can't always trust what the documentation says > right

Re: [sqlite] sqlite3 and statement variables

2004-09-22 Thread Vladimir Vukicevic
On Wed, 22 Sep 2004 22:32:51 -0700, Cory Nelson <[EMAIL PROTECTED]> wrote: > I was under the impression that the notation was just ? (no ending > number) and :AAA (no ending colon). Using it like that works fine for > me. Yep, plain unnumbered "?" works fine -- however, the docs and sqlite3.h

[sqlite] sqlite3 and statement variables

2004-09-22 Thread Vladimir Vukicevic
Howdy, I'm trying to prepare statements using the ?n and/or :N: notation mentioned in the documentation and the sqlite3.h header. However, trying something like "INSERT INTO foo VALUES( ?1 )" results in SQLITE_ERROR, with the error string being 'near "1": syntax error'. Similar results with

[sqlite] saving statement values and/or cloning statements

2004-09-22 Thread Vladimir Vukicevic
Is there any way to get a sqlite3_value for a column value of a statement result? I'd like to have some way to fetch all of the rows from a query (akin to sqlite3_get_table), but to still be able to use the sqlite data-conversion bits. I can also implement what I'm looking for if I had a way to

[sqlite] more fine-grained SQL error codes?

2004-09-13 Thread Vladimir Vukicevic
Is there a way to get more fine-grained error information from SQLite in the case of a SQL error, other than the error message? I'm thinking of the particular case of a table already existing that you try to CREATE TABLE on -- right now, you just get SQLITE_ERROR and the actual error is in the

Re: [sqlite] Mozilla XPCOM

2004-09-13 Thread Vladimir Vukicevic
Howdy, On Mon, 13 Sep 2004 19:48:25 +0100 (BST), Christian Smith <[EMAIL PROTECTED]> wrote: > On Mon, 13 Sep 2004, Stefan Neumann wrote: > >I think sqlite could be ideal for this purpose. Does anybody know > >of any intentions to make something like an XPCOM-wrapper for > >sqlite? Could this mean

Re: [sqlite] [ANN] 1st pre-alpha release of the SQLite OLE/DB provider

2004-09-11 Thread Vladimir Vukicevic
Hi yesso, On Sat, 11 Sep 2004 09:02:08 +0200, yesso <[EMAIL PROTECTED]> wrote: > > hi, can i use this provider in a c# project? > You may want to also look at the SQLite ADO.NET provider at http://www.mono-project.com/contributing/sqlite.html , which is part of mono's class libraries, but