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 effect, the SELECT statement was failing and reporting that the
temp store directory is not set !

Summary :

You must set the temp store directory on Windows Store (RT) and Windows
Phone 8 platforms. If sqlite3_shutdown() is issued, then it must be reset
again.

>From a product perspective,ideally, on Win RT/WP8, it would be better if
this is handled by sqlite internally. At the least, by default, if not set,
sqlite can use the current database file location as its temp store
directory. This way, the user would be isolated from similar platform
specific issues and a platform depending implementation would not be
required by the product users.

Thanks heaps for your help.

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 2:21 PM
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] SQLITE_ERROR (SQL logic error or missing database)on
WinRT/ WP8 when querying large (!) result sets using 3.8.4.1


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 directory?
> ====> Nothing. sqlite returns success when the LocalState directory is
set.
> Many queries are run in between. No errors until the query in question 
> is run in which case sqlite reports "sqlite3_temp_directory variable 
> should
be
> set for WinRT", and sqlite3_step() returns SQLITE_ERROR.
> 
> Does the application have full read/write access to that directory?
> ====> Yes, the application can create temp files in this directory.
> 
> Are any PRAGMAs being executed prior to the query with the issue?
> ====> No
> 
> Many thanks,
> MB
> 

Is the sqlite3_shutdown() function being called at some point?  If so, the
temporary directory will need to be reset after that point.

--
Joe Mistachkin

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to