[sqlite] Simple example for dummy user writing C code

2009-04-01 Thread My Name
I'm having hard time to store and retrieve data with SQLite. Let's assume I have this structure in my C code to hold my data struct foo {   long a;   float b;   char c[1024];   int d; } so the SQL definition would be CREATE TABLE foo (  a LONG;  b FLOAT;  c VARCHAR(1024);  d INT; ); In real

Re: [sqlite] Improving query performance

2009-04-01 Thread D. Richard Hipp
On Apr 1, 2009, at 2:00 PM, John Elrick wrote: > > explain query plan > select DISTINCT RESPONSES.RESPONSE_OID > from DATA_ELEMENTS, RESPONSES, SEQUENCE_ELEMENTS > where > SEQUENCE_ELEMENTS.SEQUENCE_ELEMENT_NAME = :sequence_element_name and > DATA_ELEMENTS.DATA_ELEMENT_NAME = :data_element_name

Re: [sqlite] select the first 2 rows

2009-04-01 Thread Joanne Pham
Thanks Eric. Joanne   From: Eric Minbiole To: General Discussion of SQLite Database Sent: Wednesday, April 1, 2009 12:02:18 PM Subject: Re: [sqlite] select the first 2 rows > Hi all, > I have a big table

Re: [sqlite] 2038 year problem

2009-04-01 Thread denisgolovan
01.04.09, 22:42, "Igor Tandetnik" : > select date('2038-12-31T00:00:00'); > and returns the expected value of '2038-12-31'. Show the exact code you > have a problem with. > Igor Tandetnik Yes. I'm sorry. My fault. Wrong format. I used /MM/DD. All works :) --

Re: [sqlite] how to call c/c++ function in trigger

2009-04-01 Thread Simon Chen
Thanks, Igor! You're awesome... Igor Tandetnik wrote: > > Simon Chen wrote: >> I just realized that I need to something a bit more complicated. >> Basically, I need myfunction() to take parameters. The parameters >> should be generated based on the entry inserted, like

Re: [sqlite] Binary Format

2009-04-01 Thread Martin Pfeifle
thank you so much, that's really helpful. Best Martin Von: D. Richard Hipp An: General Discussion of SQLite Database Gesendet: Mittwoch, den 1. April 2009, 19:11:00 Uhr Betreff: Re: [sqlite] Binary Format On Apr 1,

Re: [sqlite] Binary Format

2009-04-01 Thread D. Richard Hipp
On Apr 1, 2009, at 4:24 AM, Martin Pfeifle wrote: > Hi, > we do use SQLite in a standardisation initiative and have to state > which binary file-format of sqlite is used. > Up to now, I was of the opinion that all sqlite versions 3.x use the > same binary sqlite file > format but only differ

Re: [sqlite] Binary Format

2009-04-01 Thread Martin Pfeifle
thank you. Best Martin Von: Jay A. Kreibich An: General Discussion of SQLite Database Gesendet: Mittwoch, den 1. April 2009, 15:52:08 Uhr Betreff: Re: [sqlite] Binary Format On Wed, Apr 01, 2009 at 08:24:29AM +,

Re: [sqlite] Insert performance in 3.6.11 vs. 3.5.5

2009-04-01 Thread Kees Nuyt
On Wed, 1 Apr 2009 06:08:47 +0200, Günter Obiltschnig wrote: >Well, seems that was a false alarm. We were not able to reproduce this >on other systems - there the 3.6.11 release even performed slightly >better than 3.5.5. Still no idea what caused this, as now

Re: [sqlite] how to call c/c++ function in trigger

2009-04-01 Thread Igor Tandetnik
Simon Chen wrote: > Another question is, if the c/c++ function takes 10 seconds to > finish, when another process queries the exact entry being modified, > what will be returned? Either the old data, or the busy error - depending on whether your writing connection had to

Re: [sqlite] how to call c/c++ function in trigger

2009-04-01 Thread Simon Chen
Another question is, if the c/c++ function takes 10 seconds to finish, when another process queries the exact entry being modified, what will be returned? Maybe the old data? Is it possible to lock this entry so that either the new value (when check passes) or old value (when check fails) will be

Re: [sqlite] Binary Format

2009-04-01 Thread Jay A. Kreibich
On Wed, Apr 01, 2009 at 08:24:29AM +, Martin Pfeifle scratched on the wall: > Hi, > we do use SQLite in a standardisation initiative and have to?state > which?binary?file-format of sqlite is used. > Up to now, I was of the opinion that all sqlite versions 3.x use the same > binary sqlite

Re: [sqlite] .genfkey in 3.6.12

2009-04-01 Thread Frank van Vugt
Hi, > > I noticed that the (recommended) amalgation version 3.6.12 does not > > contain > > the new .genfkey functionality, while the (not recommended) full > > version does. > > > > Is this on purpose? > > No, that was a mistake. It has now been fixed. Please download the >

Re: [sqlite] .genfkey in 3.6.12

2009-04-01 Thread D. Richard Hipp
On Apr 1, 2009, at 4:50 AM, Frank van Vugt wrote: > Hi, > > I noticed that the (recommended) amalgation version 3.6.12 does not > contain > the new .genfkey functionality, while the (not recommended) full > version does. > > Is this on purpose? No, that was a mistake. It has now been

[sqlite] Email address to post on mailing list

2009-04-01 Thread nishshanka sirisena
Hi. -- Email - nishshanka...@gmail.com Thanks. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] .genfkey in 3.6.12

2009-04-01 Thread Frank van Vugt
Hi, I noticed that the (recommended) amalgation version 3.6.12 does not contain the new .genfkey functionality, while the (not recommended) full version does. Is this on purpose? -- Best, Frank. ___ sqlite-users mailing list

Re: [sqlite] Binary Format

2009-04-01 Thread Martin.Engelschalk
Hi, from the website http://www.sqlite.org/oldnews.html: The file format for version 3.3.0 has changed slightly to support descending indices and a more efficient encoding of boolean values. SQLite 3.3.0 will read and write legacy databases created with any prior version of SQLite 3. But

[sqlite] Binary Format

2009-04-01 Thread Martin Pfeifle
Hi, we do use SQLite in a standardisation initiative and have to state which binary file-format of sqlite is used. Up to now, I was of the opinion that all sqlite versions 3.x use the same binary sqlite file format but only differ in the library functionality. Can somebody confirm that the