Re: [sqlite] SQLite Error VB 2012 .net Build Error 4.5.1/4.0

2014-01-16 Thread Joe Mistachkin
mmbsuc...@charter.net wrote: > > Any ideas how to get this to work? > Download the version for Visual Studio 2012 and the .NET Framework 4.5 instead. In this case, the file name would be: https://system.data.sqlite.org/downloads/1.0.90.0/sqlite-netFx45-binary-x64- 2012-1.0.90.0.zip -- Joe

Re: [sqlite] Fw: System.Data.SQLite.dll

2014-01-16 Thread Joe Mistachkin
RadSolution wrote: > > The version info for this file states that it is version 91.0.77.0 dated 31/01/2012 12:59 > This is used in several of our legacy systems (without any problems that I'm aware of). > Judging from some of the version information in the file, it looks like the source code

Re: [sqlite] fsync on iOS

2014-01-16 Thread Ward Willats
On Jan 16, 2014, at 1:50 PM, Richard Hipp wrote: > FYI: > > If you use "PRAGMA journal_mode=WAL;" with "PRAGMA synchronous=NORMAL;", > then fsync()s will only occur during a checkpoint operation. And, you can > turn off automatic checkpointing and run checkpoints from a

[sqlite] SQLite Error VB 2012 .net Build Error 4.5.1/4.0

2014-01-16 Thread mmbsucram
I downloaded the "sqlite-netFx451-binary-x64-2013-1.0.90.0.zip" binary package for the 4.5.1 .net framework. I unzipped it and added a reference to a simple little VB program to test if it would work. Nothing complicated. Just a connect, open, select, read, close dispose. I got the following

[sqlite] Question about using multiple sqlite3_stmt

2014-01-16 Thread Mikko Korkalo
Hi, I'm checking just to make sure, if something like this is OK to do in SQLite. My example works in practice but I wasn’t sure by reading the manual if I was allowed to do ANY changes between the sqlite3_step() calls. I’ve read from the mailing list there are problems if the UPDATE alters

Re: [sqlite] Mutally dependent JOIN clauses

2014-01-16 Thread James K. Lowden
On Thu, 16 Jan 2014 09:47:58 -0500 Igor Tandetnik wrote: > On 1/16/2014 5:21 AM, Rob Golsteijn wrote: > > SELECT * FROM C > > LEFT JOIN A ON A.a*A.a + B.b*B.b = C.c*c.c > > LEFT JOIN B ON A.a*A.a + B.b*B.b = C.c*c.c; > > I'm not sure how SQLite interprets this

[sqlite] How to build sqlite3 on [Open]Solaris

2014-01-16 Thread Kees Nuyt
For your information, this is how I currently build sqlite3 from trunk on Solaris "SXCE" (OpenSolaris, yeah, it's old). I'm probably kicking in open doors for some people, but it might be interesting for some others. Thanks to whoever did the autoconf/makefile effort for sqlite3 and fossil!

Re: [sqlite] fsync on iOS

2014-01-16 Thread Ward Willats
On Jan 16, 2014, at 1:50 PM, Richard Hipp wrote: > FYI: > > If you use "PRAGMA journal_mode=WAL;" with "PRAGMA synchronous=NORMAL;", > then fsync()s will only occur during a checkpoint operation. And, you can > turn off automatic checkpointing and run checkpoints from a

Re: [sqlite] fsync on iOS

2014-01-16 Thread Richard Hipp
FYI: If you use "PRAGMA journal_mode=WAL;" with "PRAGMA synchronous=NORMAL;", then fsync()s will only occur during a checkpoint operation. And, you can turn off automatic checkpointing and run checkpoints from a separate thread or process, and let that separate thread or process take the fsync()

Re: [sqlite] fsync on iOS

2014-01-16 Thread Ward Willats
On Jan 16, 2014, at 12:02 PM, Richard Hipp wrote: > Do not compile with SQLITE_NO_SYNC. Okay. Thanks. > On Jan 16, 2014, at 1:29 PM, Roger Binns wrote: > >> On 16/01/14 11:43, Ward Willats wrote: >> So it looks like fsync() is taking more than the 5

Re: [sqlite] fsync on iOS

2014-01-16 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 16/01/14 11:43, Ward Willats wrote: > So it looks like fsync() is taking more than the 5 second timeout I've > set. This is not uncommon on mobile devices using flash based storage. There is a lot of volatility in read and write performance. I

Re: [sqlite] Promoting a read-only db connection to read-write

2014-01-16 Thread Mcdonald, Brett
> PRAGMA query_only = YES This might just be a workable solution for us. >A SELECT statement should never cause the WAL file to grow. H...This is comforting and means I need to take a step back, review, reproduce and verify. If I continue to believe otherwise I'll respond with a code

Re: [sqlite] fsync on iOS

2014-01-16 Thread Richard Hipp
On Thu, Jan 16, 2014 at 2:43 PM, Ward Willats wrote: > Hello Experts: > > We are compiling our own amalgamation into our multi-threaded iOS app. > > Just saw a busy error where one thread is in sqlite doing an fsync() > (unix_sync(), full_fsync()) and the the thread that

Re: [sqlite] Pragmas

2014-01-16 Thread Richard Hipp
On Thu, Jan 16, 2014 at 2:02 PM, Tim Streater wrote: > From time to time I see the use of a particular pragma recommended by the > experts here. However, the introduction to: > > http://www.sqlite.org/pragma.html > > specifically warns that any pragma is at risk of being

[sqlite] fsync on iOS

2014-01-16 Thread Ward Willats
Hello Experts: We are compiling our own amalgamation into our multi-threaded iOS app. Just saw a busy error where one thread is in sqlite doing an fsync() (unix_sync(), full_fsync()) and the the thread that gets the error is trying to start a transaction. So it looks like fsync() is taking

[sqlite] Pragmas

2014-01-16 Thread Tim Streater
>From time to time I see the use of a particular pragma recommended by the >experts here. However, the introduction to: http://www.sqlite.org/pragma.html specifically warns that any pragma is at risk of being removed from one release to the next. And indeed, some are marked as deprecated. It

Re: [sqlite] Promoting a read-only db connection to read-write

2014-01-16 Thread Dan Kennedy
On 01/16/2014 10:46 PM, Mcdonald, Brett wrote: Can an existing sqlite read-only connection be promoted to a read-write connection, perhaps using sqlite3_file_control() and sqlite3_io_methods? Or do previously executed 'read-only' sql statements make promotion less desirable then simply

Re: [sqlite] Mutally dependent JOIN clauses

2014-01-16 Thread Simon Slavin
On 16 Jan 2014, at 3:58pm, Hick Gunter wrote: > ... = IFNULL(C.c*C.c,0) leads to the lemma: Triangles with sides of all NULL > length are right angled (for some values of NULL). NULL doesn't have values. It is a refusal to state value. Or, to put it another way: if you

Re: [sqlite] Promoting a read-only db connection to read-write

2014-01-16 Thread Simon Slavin
On 16 Jan 2014, at 3:46pm, Mcdonald, Brett wrote: > For our product, it's ideal that by default all db connections are opened > using SQLITE_OPEN_READONLY, at runtime use sqlite3_stmt_readonly() and > promote an existing db connection to read-write accordingly.

[sqlite] Promoting a read-only db connection to read-write

2014-01-16 Thread Mcdonald, Brett
Can an existing sqlite read-only connection be promoted to a read-write connection, perhaps using sqlite3_file_control() and sqlite3_io_methods? Or do previously executed 'read-only' sql statements make promotion less desirable then simply closing and opening another connection as read-write?

Re: [sqlite] Case Insensitive Defect with New Query Planner

2014-01-16 Thread Richard Hipp
On Wed, Jan 15, 2014 at 6:13 PM, Chris Swinefurth wrote: > Guys, > I’ve identified a detrimental query planner change between 3.7.12 > and 3.8.1. It appears to be a change from the 3.8 NGQP... This is completely unrelated to NGQP. The inefficiency was introduced

Re: [sqlite] Mutally dependent JOIN clauses

2014-01-16 Thread Hick Gunter
... = IFNULL(C.c*C.c,0) leads to the lemma: Triangles with sides of all NULL length are right angled (for some values of NULL). The OP posted the query as an example of ON clauses that reference fields from tables other than those immediately to the left and right of the JOIN, including

Re: [sqlite] Duplicating prepared statements

2014-01-16 Thread Igor Tandetnik
On 1/16/2014 10:04 AM, Brian Hook wrote: We could do this by keeping a 'template' of the prepared statement around and duplicating it every time we queue to the background thread. Why don't you queue *data* to the background thread, and have it bind that data as parameters to a single

Re: [sqlite] Mutally dependent JOIN clauses

2014-01-16 Thread John McKown
On Thu, Jan 16, 2014 at 8:47 AM, Igor Tandetnik wrote: > On 1/16/2014 5:21 AM, Rob Golsteijn wrote: > >> SELECT * FROM C >> LEFT JOIN A ON A.a*A.a + B.b*B.b = C.c*c.c >> LEFT JOIN B ON A.a*A.a + B.b*B.b = C.c*c.c; >> > > I'm not sure how SQLite interprets this

[sqlite] Duplicating prepared statements

2014-01-16 Thread Brian Hook
Right now our data processing code is roughly split between internal CPU side computations, then binding that data and streaming it into a SQL database. We're doing this synchronously right now but could get significant overlap if the SQL operations were running in a separate thread. The

Re: [sqlite] Mutally dependent JOIN clauses

2014-01-16 Thread Igor Tandetnik
On 1/16/2014 5:21 AM, Rob Golsteijn wrote: SELECT * FROM C LEFT JOIN A ON A.a*A.a + B.b*B.b = C.c*c.c LEFT JOIN B ON A.a*A.a + B.b*B.b = C.c*c.c; I'm not sure how SQLite interprets this query. In any case, it doesn't make much sense. I suspect you are looking for something like

[sqlite] Fw: System.Data.SQLite.dll

2014-01-16 Thread RadSolution
  Hello, The company I work for uses a version of the DLL called System.Data.SQLite.dll. The version info for this file states that it is version 91.0.77.0 dated 31/01/2012 12:59 This is used in several of our legacy systems (without any problems that I'm aware of). I have looked on the

Re: [sqlite] How to bind parameters to LIKE with sqlite3_bind_text?

2014-01-16 Thread Hick Gunter
You need to search for "%son's%" (or at least "%son's") to achieve a match. -Ursprüngliche Nachricht- Von: sqliteuser [mailto:tarmopropel...@outlook.com] Gesendet: Donnerstag, 16. Jänner 2014 08:53 An: sqlite-users@sqlite.org Betreff: Re: [sqlite] How to bind parameters to LIKE with

Re: [sqlite] How to bind parameters to LIKE with sqlite3_bind_text?

2014-01-16 Thread sqliteuser0000
Hi, sorry, that was a typo. The bind actually looks like this: sqlite3_bind_text(stmt, 1, search.c_str(), -1, SQLITE_STATIC); The string is guaranteed to live long. What else is wrong with this, why will it not match anything? Do i need to use the % symbols? E.g. If the DB contasin value "The

Re: [sqlite] Case Insensitive Defect with New Query Planner

2014-01-16 Thread Chris Swinefurth
How about the database itself? https://dl.dropboxusercontent.com/u/4781945/like_case_example.tgz The more I have thought about this, it seems 3.8.1 is doing the right thing. The query with “collate nocase” has implications for unicode that I wasn’t considering. I do wonder if the explain

Re: [sqlite] Mutally dependent JOIN clauses

2014-01-16 Thread Hick Gunter
The join is valid and the results are perfectly ok. You are using LEFT JOIN, which produces a row even if there is NO MATCH on the RHS, returning NULL for fields selected from there. SELECT * FROM C JOIN A ON A.a*A.a + B.b*B.b = C.c*c.c JOIN B ON A.a*A.a + B.b*B.b = C.c*c.c; c a

[sqlite] Mutally dependent JOIN clauses

2014-01-16 Thread Rob Golsteijn
Dear List, I came across a query with 2 LEFT JOINs of which the join clauses were mutually dependent. They did not produce the result I expected, but now I wonder if this is legal SQL in the first place. I created a small example which illustrates the problem. The example tries to find