[sqlite] Interop DLL question

2011-05-19 Thread Michael Yeaney
For the 1.0.72.0 (3.7.6+) package (x64), is there a stand-alone (mixed mode) DLL offered anymore that does not require the interop library (much like the 1.0.66.0 version? I'm using SQLite successfully in a few Microsoft Azure deployments, but with the new version, the servers are not able to

[sqlite] Unable to load dll "SQLite.Interop.dll"

2011-05-19 Thread Anderson Laécio G . Trindade
Ops... I was dealing with [Unable to load dll "SQLite.Interop.dll"] error when I was running my software on other computers. Finally I figured out that the dependency msvcr100.dll was missing on those computers. This can be helpful for other users. Regards, Anderson Laécio Galindo Trindade

[sqlite] SQLite.Interop.dll cannot be found

2011-05-19 Thread Anderson Laécio G . Trindade
Hello, I was dealing with "SQLite.Interop.dll cannot be found" error when I was running my software on other computers. Finally I figured out that the dependency msvcr100.dll was missing on those computers. This can be helpful for other users. Regards, Anderson Laécio Galindo Trindade

Re: [sqlite] handling SQLITE_LOCKED same as SQLITE_BUSY

2011-05-19 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/19/2011 07:13 PM, Sam Carleton wrote: > I have some code that > responds to SQLITE_BUSY by sleeping for 50 mills and retrying 4 times: In that case just use the default busy handler. Set a maximum timeout and it will be used. Behind the

Re: [sqlite] problems on importing quoted csv files

2011-05-19 Thread Thomas Mittelstaedt
Am Dienstag, den 17.05.2011, 13:53 +0800 schrieb jiajianying: > Hello, > > I'm using sqlite to process some csv files. It is very disappointing > that sqlite's csv mode doesn't support quoted csv format. I tried > spatialite which can only strip quote marks but can't parse it correctly. > > Is

[sqlite] handling SQLITE_LOCKED same as SQLITE_BUSY

2011-05-19 Thread Sam Carleton
I just did a quick load test on my little web app that is using SQLite in C code.  Pretty quick it ran into a SQLITE_LOCKED while a connection/user was logging in to the site.  I have some code that responds to SQLITE_BUSY by sleeping for 50 mills and retrying 4 times: int rc =

[sqlite] Bug in test/uri.test?

2011-05-19 Thread Nico Williams
foreach {tn uri file} { 1 test.db test.db ... 14 file:test%00.db%00extra test 15 test.db?mork=1#boris test.db?mork=1#boris 16 file://localhostPWD/test.db%3Fhello test.db?hello } { if

Re: [sqlite] Question: Performing Arithmetic Operations on Date Fields

2011-05-19 Thread Simon Slavin
On 20 May 2011, at 1:09am, Igor Tandetnik wrote: > insert into event values ('Christmas', '2011-12-25'); Why not actually store the Julian days ? After all, the inserting can happen slowly but you're going to want the searches and subtraction to be fast. Simon.

Re: [sqlite] Question: Performing Arithmetic Operations on Date Fields

2011-05-19 Thread Richard Hipp
On Thu, May 19, 2011 at 7:54 PM, Sandy Bottom wrote: > My objective is a query which lists events and calculates the number of > days > to the event e.g: > > > Name Days to Event > -- > Christmas 40 > > I don't know how to solve your problem in

Re: [sqlite] Question: Performing Arithmetic Operations on Date Fields

2011-05-19 Thread Igor Tandetnik
On 5/19/2011 7:54 PM, Sandy Bottom wrote: > My objective is a query which lists events and calculates the number of days > to the event e.g: > > > Name Days to Event > -- > Christmas 40 > > > The event table might look something like: > > create table event ( >name

[sqlite] Question: Performing Arithmetic Operations on Date Fields

2011-05-19 Thread Sandy Bottom
My objective is a query which lists events and calculates the number of days to the event e.g: Name Days to Event -- Christmas 40 The event table might look something like: create table event ( name varchar (50), when text (20)); (Regarding storing date

[sqlite] compartmentalizing FTS4 searches

2011-05-19 Thread Mr. Puneet Kishor
My program stores a bunch of text in an FTS4 table and makes it available for search. The wrinkle is, there are conceptually different projects for which the search has to be compartmentalized. CREATE TABLE projects (project_id INTEGER PRIMARY KEY, project_name TEXT); CREATE TABLE documents

[sqlite] Invitation to connect on LinkedIn

2011-05-19 Thread Matt Young via LinkedIn
LinkedIn Matt Young requested to add you as a connection on LinkedIn: -- Zarko, I'd like to add you to my professional network on LinkedIn. - Matt Accept invitation from Matt Young

Re: [sqlite] apple-osx branch

2011-05-19 Thread Richard Hipp
On Thu, May 19, 2011 at 5:49 PM, James Berry wrote: > Richard, > > Looking at the development timeline, apple-osx branch jumps out recently, > and raises some questions for me: > > (1) If we're building sqlite for delivery on os-x, should we be using code > from that branch,

[sqlite] apple-osx branch

2011-05-19 Thread James Berry
Richard, Looking at the development timeline, apple-osx branch jumps out recently, and raises some questions for me: (1) If we're building sqlite for delivery on os-x, should we be using code from that branch, rather than the regular distribution? (2) If yes to 1, then does that also apply

Re: [sqlite] (no subject)

2011-05-19 Thread Nico Williams
On Thu, May 19, 2011 at 4:28 PM, Nico Williams wrote: > However, I'm not sure how to write this such that there can be only > one of those constraints of which there should be just one but without > then imposing ordering on those constraints.  IMO there's no need to > fix

Re: [sqlite] How to test or create sqlite database on iPad.

2011-05-19 Thread irfan khan
thanks a lot Jean-Denis On Thu, May 19, 2011 at 12:49 PM, Jean-Denis Muys wrote: > > On 19 mai 2011, at 11:21, irfan khan wrote: > > Hi, > > We got a new iPad and have to test sqllite database. > Could you please guide me to test. > Basically I want to create

Re: [sqlite] (no subject)

2011-05-19 Thread Nico Williams
On Thu, May 19, 2011 at 4:22 PM, Pavel Ivanov wrote: >> Is there a rationale for allowing such statements or is that an effect >> of the 'Lite' nature?  (Note: I'm not complaining, just asking.) > > I believe that's an effect of the "typeless" design. As SQLite doesn't > have

Re: [sqlite] (no subject)

2011-05-19 Thread Pavel Ivanov
> Is there a rationale for allowing such statements or is that an effect > of the 'Lite' nature?  (Note: I'm not complaining, just asking.) I believe that's an effect of the "typeless" design. As SQLite doesn't have strict type names for columns it accepts pretty much anything for that. So in

Re: [sqlite] Usefulness of FKs to multiple tables

2011-05-19 Thread Darren Duncan
Jean-Christophe Deschamps wrote: > Let me ask this by mere curiosity. > > SQLite will accept and process the following: > > CREATE TABLE x (a CHAR PRIMARY KEY); > CREATE TABLE y (a CHAR PRIMARY KEY); > CREATE TABLE z (a CHAR REFERENCES x(a) REFERENCES y(a)); > > I didn't check if the last FK is

[sqlite] (no subject)

2011-05-19 Thread Jean-Christophe Deschamps
Anoher (silly) question about what SQLite considers valid input, again out of mere curiosity. A statement like: CREATE TABLE a (a CHAR COLLATE NOCASE COLLATE BINARY, b INTEGER DEFAULT 1 DEFAULT 2); doesn't cause any error: SQLite applies only the last constraint of each type, namely COLLATE

[sqlite] Usefulness of FKs to multiple tables

2011-05-19 Thread Jean-Christophe Deschamps
Let me ask this by mere curiosity. SQLite will accept and process the following: CREATE TABLE x (a CHAR PRIMARY KEY); CREATE TABLE y (a CHAR PRIMARY KEY); CREATE TABLE z (a CHAR REFERENCES x(a) REFERENCES y(a)); I didn't check if the last FK is even valid normative SQL and that isn't the heart

Re: [sqlite] Query efficiency

2011-05-19 Thread Pavel Ivanov
> sqlite> select * from aa where a_id1 in (select distinct a_id1 from ab > where ab.a_id2 = 1 and ab.b_id = 1) and a_id2 in (select distinct a_id1 > from ab where ab.a_id2 = 1 and ab.b_id = 1) ; With your schema this can be transformed the same way: select aa.* from aa, ab ab1, ab ab2 where

Re: [sqlite] SQL Statement Help(selecting days).

2011-05-19 Thread Jean-Christophe Deschamps
> > Since we use recursive triggers, set recursive_triggers pragma > > beforehand if not yet done. > >Cunning. A bit of a Rube Goldberg apparatus though, no? Huh? Still way more flexible than having to modify C source of a vtable module, should you have to adapt anything. Yeah, it's kind of

Re: [sqlite] Fossil bugs?

2011-05-19 Thread Richard Hipp
On Thu, May 19, 2011 at 1:40 PM, Nico Williams wrote: > On Thu, May 19, 2011 at 12:37 PM, Richard Hipp wrote: > > On Thu, May 19, 2011 at 1:23 PM, Nico Williams >wrote: > > Everything is protected by multiple cryptographic hashes,

Re: [sqlite] Query efficiency

2011-05-19 Thread Jim Morris
You must use the alias if specified: select ar.* from aa ar, ab ab1, ab ab2; rather than select aa.* from aa ar, ab ab1, ab ab2; On 5/19/2011 10:33 AM, Matthew Jones wrote: > select aa.* from aa ar, ab ab1, ab ab2; ___ sqlite-users mailing list

Re: [sqlite] Fossil bugs?

2011-05-19 Thread Nico Williams
On Thu, May 19, 2011 at 12:37 PM, Richard Hipp wrote: > On Thu, May 19, 2011 at 1:23 PM, Nico Williams wrote: > Everything is protected by multiple cryptographic hashes, both SHA1 and > MD5.  On-the-wire corruption is not a realistic possibility.

Re: [sqlite] Fossil bugs?

2011-05-19 Thread Richard Hipp
On Thu, May 19, 2011 at 1:23 PM, Nico Williams wrote: > On Thu, May 19, 2011 at 12:01 PM, Richard Hipp wrote: > > Anythings possible. But we've been using Fossil heavily, daily, for 4 > years > > now without any hints of these kinds of problems. So

Re: [sqlite] Query efficiency

2011-05-19 Thread Matthew Jones
First of all I couldn't for the life of we work out why that new query would work but I'm sure that's just a limit of my knowledge. I then realised that the database definition I had used was really very different from what I was trying to do so I've had another go and then tried to use the

Re: [sqlite] SQL Statement Help(selecting days).

2011-05-19 Thread Petite Abeille
On May 19, 2011, at 11:44 AM, Jean-Christophe Deschamps wrote: > Since we use recursive triggers, set recursive_triggers pragma > beforehand if not yet done. Cunning. A bit of a Rube Goldberg apparatus though, no? ___ sqlite-users mailing list

Re: [sqlite] Fossil bugs?

2011-05-19 Thread Nico Williams
On Thu, May 19, 2011 at 12:01 PM, Richard Hipp wrote: > Anythings possible.  But we've been using Fossil heavily, daily, for 4 years > now without any hints of these kinds of problems.  So fundamental bugs like > what you propose seem improbable.  I'm thinking something else is

Re: [sqlite] Fossil bugs?

2011-05-19 Thread Richard Hipp
On Thu, May 19, 2011 at 11:58 AM, Nico Williams wrote: > I installed Fossil using aptitude, but I'm thinking I should have > built and installed it from source. I'm seeing a few issues with the > version I'm using ([15cb835736] 2010-06-17 18:39:10 UTC): > > - The Makefile

[sqlite] SQLite version 3.7.6.3

2011-05-19 Thread D . Richard Hipp
SQLite version 3.7.6.3 is now available on the SQLite website http://www.sqlite.org/ http://www.sqlite.org/download.html Version 3.7.6.3 is a patch release that fixes an obscure but nasty bug in WAL-mode. Upgrading is recommended for all users. The bug is present in all prior

[sqlite] Fossil bugs?

2011-05-19 Thread Nico Williams
I installed Fossil using aptitude, but I'm thinking I should have built and installed it from source.  I'm seeing a few issues with the version I'm using ([15cb835736] 2010-06-17 18:39:10 UTC):  - The Makefile from the SQLite3 docs repository doesn't get checked out -- I thought there wasn't any,

Re: [sqlite] About Fossil usage

2011-05-19 Thread Nico Williams
I suppose one could use the "shunned artifacts" feature, then rebuild the repository as a way to collapse deltas, but that sounds like a lot of work. I'll just not collapse deltas. Also, I like the git format-patch feature - it's basically a diff with a header slapped on, but still, it's quite

Re: [sqlite] About Fossil usage

2011-05-19 Thread Nico Williams
On Thu, May 19, 2011 at 3:08 AM, Stephan Beal wrote: > On Thu, May 19, 2011 at 7:03 AM, Nico Williams wrote: >> How does one remove changesets?  How does one collapse deltas? > > Fossil doesn't allow one to remove changesets (and i'm not sure what >

Re: [sqlite] System.Data.SQLite INT vs INTEGER

2011-05-19 Thread Joe D
On 2011-05-19 01:16, Xavier Naval wrote: > You can take a look at http://sqlite.phxsoftware.com/forums/t/31.aspx > where you can find the DataType mappings for the .NET provider. > > Be careful also with > > DOUBLE -> DbType.Double > FLOAT -> DbType.Double > REAL -> DbType.Single Ah, so it is

Re: [sqlite] OSX building in xcode leading to crashing lib.

2011-05-19 Thread Richard Hipp
On Wed, May 18, 2011 at 6:52 PM, Chris Dillman < chris.dill...@zenimaxonline.com> wrote: > Im having a lot of trouble getting a working build up and running. > You are building from the canonical source code, consisting of about 100 separate source files? Why? The SQLite amalgamation would

Re: [sqlite] rtree+ trigger + update cause incorrect result for the select statement

2011-05-19 Thread Simon Slavin
On 18 May 2011, at 1:10pm, Андрей Евгеньевич Осипов wrote: > The problem appears if I have a select statement and update statement which > changes the current record of the select statement. Don't do that. You shouldn't make any changes which will change the results of the SELECT statement

Re: [sqlite] rtree+ trigger + update cause incorrect result for theselect statement

2011-05-19 Thread Igor Tandetnik
Андрей Евгеньевич Осипов wrote: > Pseudocode: > > 1. Query1.CreateAndExecute( "SELECT ... FROM TestTable INNER JOIN > TestTableRTree ON ... WHERE (...)") // This query should > return one and only record > > 2. Query2.Create( "UPDATE TestTable SET ()

Re: [sqlite] Table PARTITION

2011-05-19 Thread Igor Tandetnik
Isaac Eliassi wrote: > Does the SQLite support table (row) partition? With SQLite, the whole database is in one physical file. You can create multiple databases, each in its own file, and use ATTACH statement to allow one connection to run statements across several

[sqlite] OSX building in xcode leading to crashing lib.

2011-05-19 Thread Chris Dillman
Im having a lot of trouble getting a working build up and running. I have tried make etc to see if Im missing some flags Right now we have auto generation code using premake to gen projects on Windows, linux, mac. The resulting libs work fine on win, linux but always have crashing issues on OSX

[sqlite] Table PARTITION

2011-05-19 Thread Isaac Eliassi
Hi, Does the SQLite support table (row) partition? In case that it does, where can I read about how it is done? Best regards Isaac Eliassi Embedded Software Engineer Loggers Team R Server Infrastructure Group System & Recording NICE Systems. Israel (T) + 972-9-7753982 (F) + 972-9-7753982 (M) +

[sqlite] rtree+ trigger + update cause incorrect result for the select statement

2011-05-19 Thread Андрей Евгеньевич Осипов
Hello. It seems to me I've found a bug in the Sqlite. I have database with two tables. TestTable is ordinary table, TestTableRTree is virtual rtree table. Each table has two records. Also database has after update trigger for table TestTable, this trigger updates corresponding record in the

Re: [sqlite] Unknown parameter for prepare_v2

2011-05-19 Thread Simon Slavin
On 19 May 2011, at 9:35am, Dev_lex wrote: > I need to prepare the statement before to know the name of the table, but > I'll find an other way.. >> >>> >>> I would like to do this : >>> >>> const char *zSql = "INSERT INTO ?(ID, MyData) VALUES('1',?)"; Instead of using a const, use a C

Re: [sqlite] How to test or create sqlite database on iPad.

2011-05-19 Thread Jean-Denis Muys
On 19 mai 2011, at 11:21, irfan khan wrote: Hi, We got a new iPad and have to test sqllite database. Could you please guide me to test. Basically I want to create database, create tables insert some records, and fetch records from iPad itself. Is there any way to create database on iPad for

Re: [sqlite] SQL Statement Help(selecting days).

2011-05-19 Thread Jean-Christophe Deschamps
>On Wed, May 18, 2011 at 4:10 PM, Petite Abeille > wrote: > > On May 18, 2011, at 10:50 PM, Danilo Cicerone wrote: > >> How can I simulate a > >> calendar table(maybe using the strftime funtion)? > > > > Well, you have two broad options: > > > > (1) materialize the

[sqlite] How to test or create sqlite database on iPad.

2011-05-19 Thread irfan khan
Hi, We got a new iPad and have to test sqllite database. Could you please guide me to test. Basically I want to create database, create tables insert some records, and fetch records from iPad itself. Is there any way to create database on iPad for preinstalled sqlite. Thank & Regards Irfan khan

Re: [sqlite] SQlite on delete trigger error

2011-05-19 Thread Simon Davies
On 19 May 2011 07:16, Support Lists wrote: > Hi, > > I have the following sqlite trigger: > / > /|/CREATE TRIGGER DLT_actymethods_ibfk_1 BEFORE DELETE ON activity FOR > EACH ROW BEGIN DELETE FROM actymethods WHERE ACTY_COD = OLD.ACTY_COD; END/ > > |So before delete the

Re: [sqlite] Unknown parameter for prepare_v2

2011-05-19 Thread Dev_lex
Oh ok.. Thanks a lot, I thought there was some way to do that.. I need to prepare the statement before to know the name of the table, but I'll find an other way.. Thanks ! Martin Engelschalk wrote: > > Hi, > > you cannot bind the name of a table. Bind variables only work for Values > in

Re: [sqlite] Unknown parameter for prepare_v2

2011-05-19 Thread Martin.Engelschalk
Hi, you cannot bind the name of a table. Bind variables only work for Values in the database, like you used in the VALUES('1', ?) - clause. Names of tables, columns or other items of the schema must be written in the sql statement. You will have to build your statement (using sprintf() or

Re: [sqlite] About Fossil usage

2011-05-19 Thread Stephan Beal
On Thu, May 19, 2011 at 7:03 AM, Nico Williams wrote: > Is a "private" branch then one for which autosync is off, or is there > some other distinction as well? How does one change a branch to no > longer be private? >

[sqlite] Unknown parameter for prepare_v2

2011-05-19 Thread Dev_lex
Hello, I've a little question about sqlite3_prepare_v2 : I would like to do this : const char *zSql = "INSERT INTO ?(ID, MyData) VALUES('1',?)"; if(ppStmt) { sqlite3_bind_parameter_name(ppStmt, "atest"); sqlite3_bind_blob(ppStmt, 2, , sizeof(blob), SQLITE_TRANSIENT);

Re: [sqlite] DB triggers: Initial patch

2011-05-19 Thread Stephan Beal
On Wed, May 18, 2011 at 11:24 PM, Nico Williams wrote: > - setup Fossil clones that folks can pull from (this means getting my > hosting provider to add support for Fossil, so it won't happen soon > enough) > If your hoster supports CGI, that's all you need to host fossil

Re: [sqlite] System.Data.SQLite INT vs INTEGER

2011-05-19 Thread Xavier Naval
Hello, You can take a look at http://sqlite.phxsoftware.com/forums/t/31.aspx where you can find the DataType mappings for the .NET provider. Be careful also with DOUBLE -> DbType.Double FLOAT -> DbType.Double REAL -> DbType.Single Xevi 2011/5/19 Joe D : > > I have an app that

[sqlite] SQlite on delete trigger error

2011-05-19 Thread Support Lists
Hi, I have the following sqlite trigger: / /|/CREATE TRIGGER DLT_actymethods_ibfk_1 BEFORE DELETE ON activity FOR EACH ROW BEGIN DELETE FROM actymethods WHERE ACTY_COD = OLD.ACTY_COD; END/ |So before delete the row from the table activity delete all records from the table actymethods