Re: [sqlite] Fortran 95 Language Bindings

2007-04-19 Thread Arjen Markus
Liam Healy wrote: Arjen, I've taken another look at these bindings, and at my project. For a variety of reasons, most not related to the sqlite3 Fortran bindings, I have decided to proceed in a different direction. However, on closer examination of the Fortran bindings and other language

[sqlite] amalgamation from source distribution

2007-04-19 Thread Jens Miltner
When I recreate the amalgamation from the source tarball using "make sqlite3.c" on Mac OS X, I end up with a slightly different amalgamation file. The differences are (obviously) only in the generated source files and mostly seems to be re-ordered token tables, different token values, etc.

[sqlite] sqlite3_reset (or sqlite3_finalize) and error reporting?

2007-04-19 Thread Jef Driesen
I have some questions on the usage of sqlite3_reset (or sqlite3_finalize) after sqlite3_step. In the legacy interface I use sqlite3_reset after sqlite3_step to obtain a more specific error code for SQLITE_ERROR (to be able to detect schema errors and automatically reprepare the statement,

[sqlite] how to run tests with amalgamized build?

2007-04-19 Thread Jens Miltner
How do I run the tests with an amalgamized build? I have tried to mingle the Makefile to build libsqlite3 from sqlite3.c, but apparently, testfixture compiles some source files again and I get conflicts of symbols being multiple defined... Since we're not using precompiled binaries, I'd

Re: [sqlite] how to run tests with amalgamized build?

2007-04-19 Thread drh
Jens Miltner <[EMAIL PROTECTED]> wrote: > How do I run the tests with an amalgamized build? You may need to adjust a pathname or two, but the following is the general idea: make sqlite3.c gcc -o testfixure -g -O3 -Wall \ -DSQLITE_NO_SYNC=1 \ -DSQLITE_DEBUG=1 \

[sqlite] DROP TABLE slower than DELETE?

2007-04-19 Thread Guy Hindell
Hi all In promoting SQLite 3 (still v3.2.7, so a bit behind the current release) for a new project I have been doing some performance tests and SQLite generally looks very good. However, I have seen one surprising result. My schema is simple, a single table with a simple autoincrement rowid

[sqlite] warnings about potentially uninitialized variables when building 3.3.16 with -O3

2007-04-19 Thread Jens Miltner
When I build sqlite3 3.3.16 on Mac OS X with -O3 optimization, I get the following list of warnings about potentially uninitialized variables: gcc 3.3: CompileC build/sqlite.build/Release/sqlite_static_lib.build/Objects- normal/ppc/sqlite3.o sqlite3.c normal ppc c com.apple.compilers.gcc.

[sqlite] sqlite database on a read only media

2007-04-19 Thread Rich Rattanni
All: Is it possible to have an sqlite database on a read only media? I will only be issuing SELECT queries on this database. Are there any pragma's you need to issue to let SQLITE know it is not acceptable to write to the database file. -- Rich Rattanni

Re: [sqlite] DROP TABLE slower than DELETE?

2007-04-19 Thread drh
Guy Hindell <[EMAIL PROTECTED]> wrote: > > In promoting SQLite 3 (still v3.2.7, so a bit behind the current > release) for a new project I have been doing some performance tests and > SQLite generally looks very good. However, I have seen one surprising > result. > > My schema is simple, a

Re: [sqlite] sqlite database on a read only media

2007-04-19 Thread drh
"Rich Rattanni" <[EMAIL PROTECTED]> wrote: > All: > Is it possible to have an sqlite database on a read only media? I > will only be issuing SELECT queries on this database. Are there any > pragma's you need to issue to let SQLITE know it is not acceptable to > write to the database file. >

Re: [sqlite] how to run tests with amalgamized build?

2007-04-19 Thread Jens Miltner
Am 19.04.2007 um 15:42 schrieb [EMAIL PROTECTED]: Jens Miltner <[EMAIL PROTECTED]> wrote: How do I run the tests with an amalgamized build? You may need to adjust a pathname or two, but the following is the general idea: make sqlite3.c gcc -o testfixure -g -O3 -Wall \

[sqlite] Reducing memory usage when reading a blob

2007-04-19 Thread Stan Bielski
Hello, I'm cooking up some blob reading code based on the following example -> http://www.sqlite.org/cvstrac/wiki?p=BlobExample The author prepares a statement and reads the blob value in the following manner -> *if*( rc==SQLITE_ROW ){** *pnBlob =

Re: [sqlite] Reducing memory usage when reading a blob

2007-04-19 Thread Nuno Lucas
On 4/19/07, Stan Bielski <[EMAIL PROTECTED]> wrote: On a similar note, are there any hacks available to write a blob to a file using a limited memory buffer? As far as I can tell, the sqlite API requires that a blob be read in its entirety, which is rather unfortunate when the blob is bigger

[sqlite] Show and describe

2007-04-19 Thread Michael Boldin via alt email
Does SQLite have anything like SHOW and DESCRIBE (in MySQL) I check the synatax documentation and it seems not. Otherwise how can I determine date tables in a database group and columns in table and their type __ Do You Yahoo!? Tired of spam?

[sqlite] Re: Show and describe

2007-04-19 Thread Igor Tandetnik
Michael Boldin via alt email wrote: Otherwise how can I determine date tables in a database group and columns in table and their type select * from sqlite_master; pragma table_info(tableName); Igor Tandetnik - To

[sqlite] beginner: Is posible inside a result of a function call another function for delete or update the row??

2007-04-19 Thread David A O L
I have a very basic sql statement, mainly Im printing it... static int GuardaActividadEnArchivo(void *arg1, int argc, char **argv, char **azColName){ int i; char *nombre, *ok, *ko, *actividad; nombre = ok = ko = actividad = 0; for (i = 0; i < argc; i++) { printf("%s = %s ",

[sqlite] One statement column to column copy

2007-04-19 Thread Rich Rattanni
All: I have a main table (Parameters) which contains system parameters to which I clone the table to a temporary database... CREATE TEMPORARY TABLE WorkingParameters AS SELECT * from Parameters; I modify the parameters in the temporary table, and occasionally I may want to save them. Reading

[sqlite] Re: One statement column to column copy

2007-04-19 Thread Rich Rattanni
On 4/19/07, Rich Rattanni <[EMAIL PROTECTED]> wrote: All: I have a main table (Parameters) which contains system parameters to which I clone the table to a temporary database... CREATE TEMPORARY TABLE WorkingParameters AS SELECT * from Parameters; I modify the parameters in the temporary

[sqlite] Re: One statement column to column copy

2007-04-19 Thread Igor Tandetnik
Rich Rattanni <[EMAIL PROTECTED]> wrote: I have a main table (Parameters) which contains system parameters to which I clone the table to a temporary database... CREATE TEMPORARY TABLE WorkingParameters AS SELECT * from Parameters; I modify the parameters in the temporary table, and

Re: [sqlite] Re: One statement column to column copy

2007-04-19 Thread Rich Rattanni
update Parameters set value = (select value from WorkingParameters wp where wp.id = Parameters.id); Hi Igor, That worked fine. I am curious why it does work? According to the sqlite syntax guide, it says that... "When a SELECT appears within an expression but is not the right operand

[sqlite] Re: Re: One statement column to column copy

2007-04-19 Thread Igor Tandetnik
Rich Rattanni <[EMAIL PROTECTED]> wrote: update Parameters set value = (select value from WorkingParameters wp where wp.id = Parameters.id); That worked fine. I am curious why it does work? Why shouldn't it? According to the sqlite syntax guide, it says that... "When a SELECT

Re: [sqlite] Re: Re: One statement column to column copy

2007-04-19 Thread Rich Rattanni
What you tried made no sense. You can only use a table name in a statement if it's the "primary" table of the statement (for UPDATE and DELETE) or was explicitly introduced into the statement by FROM clause (for SELECT). You can't just throw in any odd table, because you can't then specify which

[sqlite] Re: Re: Re: One statement column to column copy

2007-04-19 Thread Igor Tandetnik
Rich Rattanni <[EMAIL PROTECTED]> wrote: I mean't when I tried this... update Parameters set value = (select value from WorkingParameters wp); When you execute this, it works, but it takes the first result row from value and copies it into all the rows of parameters. Of course. That's what

Re: [sqlite] beginner: Is posible inside a result of a function call another function for delete or update the row??

2007-04-19 Thread Dan Kennedy
On Thu, 2007-04-19 at 13:29 -0500, David A O L wrote: > I have a very basic sql statement, mainly Im printing it... > > static int GuardaActividadEnArchivo(void *arg1, int argc, char **argv, char > **azColName){ > int i; > char *nombre, *ok, *ko, *actividad; > nombre = ok = ko =