[sqlite] sqlite3_trace args?

2004-10-05 Thread kervin
Hello, I am trying debugging my application ( Sqlite reports no errors after a CREATE query, but the table does not exist ). I'd like to use sqlite3_trace() function, but the documentation does not have the expected args, neither does the mail archives. Can someone explain to me briefly what

Re: [sqlite] what is difference with PK and Unique index

2004-10-05 Thread D. Richard Hipp
You can only have one primary key and the primary key cannot contain a NULL value. Also, INTEGER PRIMARY KEY has special properties but INTEGER UNIQUE does not. -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565

[sqlite] what is difference with PK and Unique index

2004-10-05 Thread luke
as title!

[sqlite] Did sqlite3_free replace sqlite_freemem

2004-10-05 Thread Steve Frierdich
Can someone tell me if the function sqlite3_free in sqllite version 3 replaced sqlite_freemem function in sqllite version 2? Thanks Steve

[sqlite] SQLite mime type(s)

2004-10-05 Thread Jarosław Staniek
What is preferred (or better: official) mime type for sqlite3 format? And for sqlite2? Is this ok: application/x-sqlite3 application/x-sqlite2 ? -- regards / pozdrawiam, Jaroslaw Staniek / OpenOffice Polska Kexi project: http://koffice.org/kexi/ http://www.kexi-project.org/ Qt-KDE Wrapper

Re: [sqlite] Get a table's primary key?

2004-10-05 Thread Will Leshner
Tito Ciuro wrote: 3) Then I parse the CREATE TABLE... statement and separate columns from datatypes. You can look for INTEGER PRIMARY KEY. Would that work for you? In practice, how safe is it to parse the CREATE SQL? Unless, of course, you have a full SQL parser at your disposal.

Re: [sqlite] Get a table's primary key?

2004-10-05 Thread Tito Ciuro
Hi Kirk, On Oct 5, 2004, at 21:10, Kirk Haines wrote: But is there a way to get the name of that field? 1) I obtain the SQL statement that generated the table in the first place with something like this: SELECT sql FROM sqlite_master WHERE tbl_name = 'test'; 2) The above statement returns

Re: [sqlite] Get a table's primary key?

2004-10-05 Thread Kirk Haines
On Tue, 05 Oct 2004 12:16:15 -0700, Will Leshner <[EMAIL PROTECTED]> wrote: > Kirk Haines wrote: > > You can use #PRAGMA table_info() to find out information about the columns in a > table, including which columns are primary keys. But you can have more than one > primary key column and they

Re: [sqlite] Get a table's primary key?

2004-10-05 Thread Nuno Lucas
Kirk Haines, dando pulos de alegria, escreveu : On Tue, 05 Oct 2004 19:03:33 +0100, Eddy Macnaghten <[EMAIL PROTECTED]> wrote: rowid is alsways an alias for the primary key whether an "integer primary key" field was specified or not But is there a way to get the name of that field? Yes, you can

Re: [sqlite] Get a table's primary key?

2004-10-05 Thread Will Leshner
Kirk Haines wrote: If, however, there is a way to get the name of the field from the API, then the driver could simply be patched to pass this info, like most of the drivers do, and then most of the time things should just work, without having to take extra steps. You can use #PRAGMA table_info()

Re: [sqlite] Degradation of performance in SQLite 3?

2004-10-05 Thread Ulrik Petersen
Dr. Hipp, > Ulrik Petersen wrote: >> >> has anyone experienced less performance with SQLite 3.0.7 over 2.8.13 on >> the same data? That is what I am experiencing. I'd appreciate help in >> figuring out why and perhaps what I can do about it. >> > > SQLite 3.0 requires less disk I/O at the

Re: [sqlite] Get a table's primary key?

2004-10-05 Thread Kirk Haines
On Tue, 05 Oct 2004 19:03:33 +0100, Eddy Macnaghten <[EMAIL PROTECTED]> wrote: > > > rowid is alsways an alias for the primary key whether an "integer > primary key" field was specified or not But is there a way to get the name of that field? I have a object/relational modelling library that

Re: [sqlite] Get a table's primary key?

2004-10-05 Thread Eddy Macnaghten
rowid is alsways an alias for the primary key whether an "integer primary key" field was specified or not On Tue, 2004-10-05 at 18:57, Kirk Haines wrote: > Does the SQLite API (for either 2.x or 3.x versions of SQLite) offer > any way to determing which field, if any, in a table was created as

[sqlite] Get a table's primary key?

2004-10-05 Thread Kirk Haines
Does the SQLite API (for either 2.x or 3.x versions of SQLite) offer any way to determing which field, if any, in a table was created as an INTEGER PRIMARY KEY? I've looked through the API docs, but either I am overlooking it, or this capability doesn't exist. Thanks, Kirk Haines

Re: [sqlite] Degradation of performance in SQLite 3?

2004-10-05 Thread D. Richard Hipp
Ulrik Petersen wrote: has anyone experienced less performance with SQLite 3.0.7 over 2.8.13 on the same data? That is what I am experiencing. I'd appreciate help in figuring out why and perhaps what I can do about it. SQLite 3.0 requires less disk I/O at the expense of using more CPU cycles.

Re: [sqlite] version 3.0.7 giving unresolved external symbol with _sqlite_free_table, _sqlite_open, _sqlite_close, _sqlite_get_table, _sqlite_exec

2004-10-05 Thread Stephen C. Gilardi
The prefix for several like-named routines in sqlite 3.0.7 is "sqlite3". For example: sqlite3_open Could it be that somehow you've #included "sqlite.h" instead of "sqlite3.h" in your sources? --Steve On Oct 5, 2004, at 12:45 PM, Steve Frierdich wrote: I made a static library out of the source

[sqlite] Degradation of performance in SQLite 3?

2004-10-05 Thread Ulrik Petersen
Hi all, has anyone experienced less performance with SQLite 3.0.7 over 2.8.13 on the same data? That is what I am experiencing. I'd appreciate help in figuring out why and perhaps what I can do about it. I have a linguistic database (it's from my project, Emdros http://emdros.org/) and the

Re: [sqlite] MT app using 2.8.14 - collision on sqlite_close() ?

2004-10-05 Thread John
Thanks for the response, Richard. I took a look through main.c, pager.c and os.c and do not see anything that may have caused such behavior. I have tried repeatedly to reproduce the phenomenon and have not been successful (which is good). Looks like I must have had some other issue around the

Re: [sqlite] Schema of an attached database

2004-10-05 Thread Eddy Macnaghten
Wow - that was fast! Any plans for a 3.0.8? Eddy On Tue, 2004-10-05 at 16:44, D. Richard Hipp wrote: > Eddy Macnaghten wrote: > > This does not seem to work for 3.0.7 > > > > > >>Marc Pitoniak wrote: > >> > >>>To get the schema of a table T from A I've tried "PRAGMA table_info('A.T') " >

Re: [sqlite] Schema of an attached database

2004-10-05 Thread D. Richard Hipp
Eddy Macnaghten wrote: This does not seem to work for 3.0.7 Marc Pitoniak wrote: To get the schema of a table T from A I've tried "PRAGMA table_info('A.T') " among other things without any success. PRAGMA A.table_info(T); Fixed with check-in [2001]

Re: [sqlite] Schema of an attached database

2004-10-05 Thread Eddy Macnaghten
This does not seem to work for 3.0.7 If you have a table named "t" in the main database, and you attach a database that has a table named t in it as attachdb, then pragma attachdb.table_info(t); still seems to give the info for the table t in the main database. Is this a bug or have I got it

Re: [sqlite] Re: FOREIGN:[sqlite] Receiving notification of table updates

2004-10-05 Thread Christian Smith
On Tue, 5 Oct 2004, Kazuho Oku wrote: >From: "Christian Smith" <[EMAIL PROTECTED]> > >The apache module I am writing is an access controller. It queries the >SQLite database and send different contents to clients depending on their IP >addresses / cookies. So it's a simple table lookup based

Re: [sqlite] Locking enhancments

2004-10-05 Thread D. Richard Hipp
Ned Batchelder wrote: I would really like to try the changes, but I'm not set up to build from CVS. Can you make a source code zip file available with the preprocessing and code generation done already? http://www.sqlite.org/sqlite3071.zip -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565

RE: [sqlite] Locking enhancments

2004-10-05 Thread Ned Batchelder
I would really like to try the changes, but I'm not set up to build from CVS. Can you make a source code zip file available with the preprocessing and code generation done already? --Ned. http://nedbatchelder.com -Original Message- From: D. Richard Hipp [mailto:[EMAIL PROTECTED] Sent:

RE: [sqlite] Schema of an attached database

2004-10-05 Thread Marc Pitoniak
Thank you very much. -Marc -Original Message- From: D. Richard Hipp [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 05, 2004 8:09 AM To: [EMAIL PROTECTED] Subject: Re: [sqlite] Schema of an attached database Marc Pitoniak wrote: > > To get the schema of a table T from A I've tried

Re: [sqlite] Schema of an attached database

2004-10-05 Thread D. Richard Hipp
Marc Pitoniak wrote: To get the schema of a table T from A I've tried "PRAGMA table_info('A.T') " among other things without any success. PRAGMA A.table_info(T); -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565