bbqchickenrobot / csharp-sqlite

Automatically exported from code.google.com/p/csharp-sqlite
Other
0 stars 0 forks source link

Silverlight. Access denied on sqlite3_open #102

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Last version, I write:
_db = new Sqlite3.sqlite3();
int rc = Sqlite3.sqlite3_open("test.db", ref _db);
result:
Access denied on path "test.db"

I think not correct access to the IsolatedStorage
Help please!

Original issue reported on code.google.com by BAndy...@gmail.com on 18 Mar 2011 at 9:51

GoogleCodeExporter commented 9 years ago
OK, I'm solved this problem by editing os_win_c.cs
2566   -#if WINDOWS_PHONE 
2566   +#if WINDOWS_PHONE || SQLITE_SILVERLIGHT 
    fs = new System.IO.IsolatedStorage.IsolatedStorageFileStream(zConverted, dwCreationDisposition, dwDesiredAccess, dwShareMode, System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication());

and 

2958   -#if WINDOWS_PHONE 
2958   +#if WINDOWS_PHONE || SQLITE_SILVERLIGHT
     zOut = zRelative;  

I don't know correct it is or no ;)  
But now any sqlite3_exec
return code 10: disk I/O error
and all doing OK (create table, insert)

Original comment by BAndy...@gmail.com on 18 Mar 2011 at 1:49

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 2dac888cd555.

Original comment by noah.hart@gmail.com on 18 Mar 2011 at 2:37