-
Notifications
You must be signed in to change notification settings - Fork 97
Transaction fails due to invalid temporary directory on UWP #116
Comments
Hmm, I thought the native library had code that did this automatically... |
You could always just do this too: var command = connection.CreateCommand();
command.CommandText =
$"PRAGMA data_store_directory = '{ApplicationData.Current.TemporaryFolder.Path}';";
connection.Open();
connection.ExecuteNonQuery(); |
I think the "pit of failure" here relates to #55. It sucks that you have to do two extra things on UWP just to get it working. |
Interesting...why is this bug occurring? (and not just in our library). Isn't SQLite supposed to put temp files in the same directory as the database file? |
Both
|
According to the documentation I am not sure we need to do anything with temp_store. In case it helps, I found a thread that claims SQLite will use whatever the |
We could add automatically run this when a new connection opens. (e.g. https://github.com/natemcmaster/Microsoft.Data.Sqlite/commit/91e2be3ba5acd020aecf08bbfc2123f3992ee3fa). @bricelam how would we setup x-compile? This sample doesn't compile because there is no DNX-friendly way to add a reference Windows SDK APIs. |
Blocked on aspnet/dnx#2302? |
For true cross-compile, yes. We can probably get around this using DLR. |
(Not sure whether this library is meant to be usable in UAP, but based on aspnet/dnx#2302 I suppose that yes. Currently it works fine when referenced directly).
In UAP you need to adjust SQLite temp path (see similar issue oysteinkrog/SQLite.Net-PCL#157). Without it, certain scenarios involving DDL inside a transaction fail with "SQL logic error".
Related test case:
The text was updated successfully, but these errors were encountered: