Re: [sqlite] SQLITE_ERROR (SQL logic error or missing database)on WinRT/ WP8 when querying large (!) result sets using 3.8.4.1

2014-03-27 Thread Muharrem Bilgin (Bright Software)
Joe, Bingo !!! You are a legend ! This fixes the issue. After a careful code review, we found that sqlite3_shutdown() was being called in between. Then naturally, that is why when we reached to a stage where the big query in question is executed, because the temp store setting was not in

Re: [sqlite] SQLITE_ERROR (SQL logic error or missing database)on WinRT/ WP8 when querying large (!) result sets using 3.8.4.1

2014-03-27 Thread Joe Mistachkin
Muharrem Bilgin wrote: > > Hi Joe, > Answers below. > > Is the directory obtained via the > Windows::Storage::ApplicationData::Current->LocalFolder->Path property? > > Yes > > What SQLite warning/error log entries are you seeing when you set the > temporary directory to the LocalState

Re: [sqlite] SQLITE_ERROR (SQL logic error or missing database) on WinRT/ WP8 when querying large (!) result sets using 3.8.4.1

2014-03-27 Thread Muharrem Bilgin (Bright Software)
Hi Joe, Answers below. Is the directory obtained via the Windows::Storage::ApplicationData::Current->LocalFolder->Path property? > Yes What SQLite warning/error log entries are you seeing when you set the temporary directory to the LocalState directory? > Nothing. sqlite returns success

Re: [sqlite] Is this normal behavior for a unique index?

2014-03-27 Thread SongbookDB
Gidday Simon The PK is the first column, an id, created as PalID INTEGER PRIMARY KEY AUTOINCREMENT Not sure what you mean by affiliation, but if you mean related indexes, there are none 0 the only index on the table is CREATE UNIQUE INDEX songsIndex ON songs ( DiscID, Artist, Title ) Thanks

Re: [sqlite] Is this normal behavior for a unique index?

2014-03-27 Thread Simon Slavin
On 28 Mar 2014, at 1:12am, SongbookDB wrote: > However, if, for example the DiscId is blank, but the artist and title are > not, a new record is created when there is already one with a blank DiscId > and the same artist and title - BAD. What's the primary key on

Re: [sqlite] SQLITE_ERROR (SQL logic error or missing database onWinRT/ WP8 when querying large (!) result sets using 3.8.4.1

2014-03-27 Thread Simon Slavin
On 28 Mar 2014, at 12:58am, Muharrem Bilgin (Bright Software) wrote: > Agreed, and no offence taken :-) The difficulty is to how to get the shell > tool run on Windows RT/Windows Phone 8 ? I wonder if there is any utility > out there based on 3.8.4.1 (or 3.8.4.2 )

Re: [sqlite] SQLITE_ERROR (SQL logic error or missing database) on WinRT/ WP8 when querying large (!) result sets using 3.8.4.1

2014-03-27 Thread Joe Mistachkin
Muharrem Bilgin wrote: > > Yes to both questions (we are checking the result and it is returning > SQLITE_OK, and we are passing a UTF-16 string). > Is the directory obtained via the Windows::Storage::ApplicationData::Current->LocalFolder->Path property? What SQLite warning/error log entries

[sqlite] Is this normal behavior for a unique index?

2014-03-27 Thread SongbookDB
Gidday guys I'm working with SQLite in Flash. I have this unique index: CREATE UNIQUE INDEX songsIndex ON songs ( DiscID, Artist, Title ) I have a parametised recursive functionset up to insert any new rows (single or multiple). It works fine if I try to insert a row with the same DiscID,

Re: [sqlite] SQLITE_ERROR (SQL logic error or missing database) on WinRT/ WP8 when querying large (!) result setsusing 3.8.4.1

2014-03-27 Thread Muharrem Bilgin (Bright Software)
Joe, Yes to both questions (we are checking the result and it is returning SQLITE_OK, and we are passing a UTF-16 string). MB -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe Mistachkin Sent: Friday, 28 March 2014 11:54

Re: [sqlite] SQLITE_ERROR (SQL logic error or missing database onWinRT/ WP8 when querying large (!) result sets using 3.8.4.1

2014-03-27 Thread Muharrem Bilgin (Bright Software)
Simon, Agreed, and no offence taken :-) The difficulty is to how to get the shell tool run on Windows RT/Windows Phone 8 ? I wonder if there is any utility out there based on 3.8.4.1 (or 3.8.4.2 ) that we can use and connect to a test database and check this ourselves on Windows RT/WP8. Thanks

Re: [sqlite] SQLITE_ERROR (SQL logic error or missing database) on WinRT/ WP8 when querying large (!) result setsusing 3.8.4.1

2014-03-27 Thread Joe Mistachkin
Muharrem Bilgin wrote: > > Tried using the suggested " int sqlite3_win32_set_directory(DWORD type, > LPCWSTR zValue);" before opening any database connection. sqlite still > reports " sqlite3_temp_directory variable should be set for WinRT". > Are you checking the return code from the

Re: [sqlite] SQLITE_ERROR (SQL logic error or missingdatabase) on WinRT/ WP8 when querying large (!) result setsusing 3.8.4.1

2014-03-27 Thread Muharrem Bilgin (Bright Software)
Joe, Tried using the suggested " int sqlite3_win32_set_directory(DWORD type, LPCWSTR zValue);" before opening any database connection. sqlite still reports " sqlite3_temp_directory variable should be set for WinRT". We are trying to set the Windows RT's sandbox local directory of the

Re: [sqlite] SQLITE_ERROR (SQL logic error or missing database) on Win RT/ WP8 when querying large (!) result sets using 3.8.4.1

2014-03-27 Thread Muharrem Bilgin (Bright Software)
Richard The first workaround "FROM PRD_DETAILS INDEXED BY sqlite_autoindex_PRD_DETAILS_1" worked. However the second work around " PRAGMA temp_store=MEMORY;" did not help resolve the issue, even though it is executed with no errors. Thank you for your help, MB -Original Message-

Re: [sqlite] Primary key used in compound index

2014-03-27 Thread Pavel Vazharov
Hi guys, Just a little update for somebody who could have the same problem. I built the test application with SQLite version 3.8.4.2 (before it was built with 3.6.17) I got the following results with the original db (with the incorrect primary key - `id` INTEGER NOT NULL PRIMARY KEY

Re: [sqlite] SQLITE_ERROR (SQL logic error or missingdatabase) on WinRT/ WP8 when querying large (!) result setsusing 3.8.4.1

2014-03-27 Thread Joe Mistachkin
Muharrem Bilgin wrote: > > The following are the log entries, which confirm your suspicion (the log > entry format : time, error description, error code). > Agreed. > > As suggested, we are already setting the temp store directory as soon as a > database connection is opened (after

Re: [sqlite] Is it possible to see timeline for given branch (or eventag)?

2014-03-27 Thread Tony Papadimitriou
Oops! That was meant for the fossil group, sorry! -Original Message- From: Tony Papadimitriou Sent: Thursday, March 27, 2014 7:26 PM To: General Discussion of SQLite Database Subject: [sqlite] Is it possible to see timeline for given branch (or eventag)? When I give the command

[sqlite] Is it possible to see timeline for given branch (or even tag)?

2014-03-27 Thread Tony Papadimitriou
When I give the command FOSSIL TIM it lists all changes in all branches (and tags). But what if I want to see changes in only, say, the TRUNK branch? Is there a way? Or maybe items having a given tag? TIA ___ sqlite-users mailing list

Re: [sqlite] SQLITE_ERROR (SQL logic error or missing database) onWinRT/ WP8 when querying large (!) result sets using 3.8.4.1

2014-03-27 Thread Richard Hipp
On Thu, Mar 27, 2014 at 7:59 AM, Richard Hipp wrote: > > SQLite 3.8.* is not using the PRIMARY KEY to sort in this case because its > cost function thinks that there is no performance advantage to using the > PRIMARY KEY to sort rather than sorting in a separate step. We might

Re: [sqlite] UNIQUE index not working as expected - what am I overlooking?

2014-03-27 Thread Peter Aronson
On 3/27/2014 4:21 AM, Richard Hipp wrote: On Thu, Mar 27, 2014 at 12:49 AM, SongbookDB wrote: Gidday guys I'm working with SQLite in Flash. I have this unique index: CREATE UNIQUE INDEX songsIndex ON songs ( DiscID, Artist, Title ) I have a parametised

Re: [sqlite] SQLITE_ERROR (SQL logic error or missing database) on Win RT/ WP8 when querying large (!) result sets using 3.8.4.1

2014-03-27 Thread Richard Hipp
On Wed, Mar 26, 2014 at 8:13 PM, Muharrem Bilgin (Bright Software) < mbil...@brightsoft.com.au> wrote: > > FROM PRD_DETAILS > > As a work-around, please try changing this line of your query to read: FROM PRD_DETAILS INDEXED BY sqlite_autoindex_PRD_DETAILS_1 At the same time, you really

Re: [sqlite] SQLITE_ERROR (SQL logic error or missing database) onWinRT/ WP8 when querying large (!) result sets using 3.8.4.1

2014-03-27 Thread Richard Hipp
On Wed, Mar 26, 2014 at 9:47 PM, Muharrem Bilgin (Bright Software) < mbil...@brightsoft.com.au> wrote: > Hi Joe, > > The following are the log entries, which confirm your suspicion (the log > entry format : time, error description, error code). > > As suggested, we are already setting the temp

Re: [sqlite] UNIQUE index not working as expected - what am I overlooking?

2014-03-27 Thread Richard Hipp
On Thu, Mar 27, 2014 at 12:49 AM, SongbookDB wrote: > Gidday guys > > I'm working with SQLite in Flash. > > I have this unique index: > > CREATE UNIQUE INDEX songsIndex ON songs ( DiscID, Artist, Title ) > > I have a parametised recursive functionset up to insert any

[sqlite] SQLite + EC + VS2012 + Code First

2014-03-27 Thread Shell Fox
Hello! I'm trying to make code-first Entity Framework model for SQLite database. I have installed Entity Framework 6.1 and SQLite packages through NuGet Package Manager. Also I have installed this tools: http://www.microsoft.com/en-us/download/details.aspx?id=40762 to get "Code first" options in

Re: [sqlite] Primary key used in compound index

2014-03-27 Thread RSmith
On 2014/03/27 12:12, Clemens Ladisch wrote: RSmith wrote: Double quotes are not part of the standard, just allowed by most systems in lieu of single quotes No. To quote : | There are four ways of quoting keywords in SQLite: | | 'keyword' A keyword

Re: [sqlite] SQLITE_ERROR (SQL logic error or missing database) onWinRT/ WP8 when querying large (!) result sets using 3.8.4.1

2014-03-27 Thread Simon Slavin
On 27 Mar 2014, at 4:00am, Muharrem Bilgin (Bright Software) wrote: > The blob issue mentioned is happening with another table in another > application. The reason it was mentioned because we have the feeling that > whenever resulting data reaches to a certain size,

[sqlite] bulk run sql query from file in sqlite async in winrt c#

2014-03-27 Thread narendra dutta
Hi All, i followed this to create my project : http://blog.thomaslebrun.net/2012/10/windows-8-using-sqlite-in-your-windows-store-application/#.UvHUrLTPXt0 . Now my requirement is to run *bulk create and insert *sql query from *a file* in sqlite. Please Help me, Please reply me. regards,

Re: [sqlite] Primary key used in compound index

2014-03-27 Thread Graham Holden
The assertion that AUTOINCREMENT has no effect (here and in another post) is incorrect.  Without it, SQLite MAY reuse a key from deleted rows; with it, this will not happen. Sent from Samsung Galaxy Note Original message From: Simon Slavin Date:

Re: [sqlite] Primary key used in compound index

2014-03-27 Thread Clemens Ladisch
RSmith wrote: > On 2014/03/27 02:50, Scott Robison wrote: >> Double quotes are part of the SQL-92 standard. I'm pretty sure they are, >> anyway. They are used (along with other database specific means) to delimit >> identifiers that would otherwise be illegal. > > Double quotes are not part of the

Re: [sqlite] UNIQUE index not working as expected - what am I overlooking?

2014-03-27 Thread RSmith
Hi Shaun, That's because Null values (or blanks) are distinct from all other Null values, so that in SQLite (and most others) the statement (NULL = NULL) returns FALSE in the case of uniqueness constraint tests (only for certain things, other times NULLS are equal, it depends on the type of