locked
Receiving exception running SQLite on Surface RT with Windows 8.1 preview RRS feed

  • Question

  • Hi,

    I am getting the following error:

    "Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"

    I am remote debugging a windows store app which uses sqlite3 (via sqlite-net) on a Surface RT. The surface is running Windows 8.1 preview as the RTM for RT is not available yet. And I am using the latest .NET Extension of SQLite for Windows Runtime (3.8).

    The target architecture is ARM. The sqlite3.dll makes its way to the Appx folder on build. And I do not have any unicode characters in my name nor path to AppData/Local which the db file is written. I have not tried the "remote deploy C++ app to RT to bring in VCLibs solution" since the app is destined to run for testers with a similar rt setup in another country. Is there anything I could be missing that is causing this error to occur? 

    Just to note, the app runs fine on PCs and slates running windows 8.1.

    Thanks

    Tuesday, September 24, 2013 8:03 PM

Answers

  • Can you clarify the ".NET Extension as a reference"?  SQLite is not .NET so you need to make sure that you are including a reference to "SQLite for Windows Runtime" in the Add References...Windows\Extensions section.  I *think* that is what you are doing, but want to make sure.

    I don't have a preview device to verify but this could be a mismatch with the preview and RTM unfortunately. 


    Tim Heuer | Program Manager, UI Platforms (XAML, WinJS) | http://timheuer.com/blog | @timheuer | Callisto - XAML UI Toolkit

    (if my post has answered your question, please consider using the *mark as answer* feature in the forums to help others)

    • Marked as answer by H Vining Wednesday, September 25, 2013 4:39 PM
    Tuesday, September 24, 2013 9:19 PM

All replies

  • Where did you get the SQLite runtime from and how are you including it in your project.  The 8.1 version is available from SQLite.org/download.html and after installing the VSIX package you would need to add a reference to the project. 

    Tim Heuer | Program Manager, UI Platforms (XAML, WinJS) | http://timheuer.com/blog | @timheuer | Callisto - XAML UI Toolkit

    (if my post has answered your question, please consider using the *mark as answer* feature in the forums to help others)

    Tuesday, September 24, 2013 8:14 PM
  • Hi Tim,

    I obtained the runtime from the visual studio gallery initially then uninstalled and got the latest version from sqlite download page yesterday. I ran the VSIX installer and included the .NET extension as a reference to the project along with the Microsoft Visual C++ Runtime Package v12. However the latest version gave the same issue as 3.7.15 it seems.

    I have also tried this with other sqlite based apps such as the sqlite for windows 8 metro/winrt apps on code msdn site (sorry cannot include links as my account is being reviewed)

    I retargeted it to 8.1 then added the 8.1 sqlite runtime references and remote debugged on the surface rt with 8.1 preview. But got the same issue unfortunately.

    Tuesday, September 24, 2013 8:46 PM
  • Ok so I have uninstalled and reinstalled the runtime for sqlite 3.8.0.2. Both sqlite based apps run on the surface RT now. However they both fail when running on the local machine or simulator at this line in the SQLite.cs (135-137)

    #if NETFX_CORE
    SQLite3.SetDirectory(/*temp directory type*/2, Windows.Storage.ApplicationData.Current.TemporaryFolder.Path);
    #endif

    Which was the same line the apps failed when running on the surface. Since this behavior is so akward I am certain I must be doing something wrong. Should I create another question for the local machine/simulator? 

    Tuesday, September 24, 2013 9:16 PM
  • Can you clarify the ".NET Extension as a reference"?  SQLite is not .NET so you need to make sure that you are including a reference to "SQLite for Windows Runtime" in the Add References...Windows\Extensions section.  I *think* that is what you are doing, but want to make sure.

    I don't have a preview device to verify but this could be a mismatch with the preview and RTM unfortunately. 


    Tim Heuer | Program Manager, UI Platforms (XAML, WinJS) | http://timheuer.com/blog | @timheuer | Callisto - XAML UI Toolkit

    (if my post has answered your question, please consider using the *mark as answer* feature in the forums to help others)

    • Marked as answer by H Vining Wednesday, September 25, 2013 4:39 PM
    Tuesday, September 24, 2013 9:19 PM
  • For the SetDirectory issue, does your username have a Unicode character in it?  This is a known issue with SQLite-net open source library (see: https://github.com/praeclarum/sqlite-net/pull/240).

    You can change the code to a diff temp directory type, like memory to get around that.

     

    Tim Heuer | Program Manager, UI Platforms (XAML, WinJS) | http://timheuer.com/blog | @timheuer | Callisto - XAML UI Toolkit

    (if my post has answered your question, please consider using the *mark as answer* feature in the forums to help others)

    Tuesday, September 24, 2013 9:26 PM
  • Yes, I'm going to Windows/Extension when adding the sqlite for windows runtime reference.

    Also I don't have any unicode characters in my name. But I tried running the app on a machine running Windows 8.1 RTM/VS 2013 RC and everything works as expected. Seems it may very well be an 8.1 Preview issue.

    Thanks for your help on this Tim!

    Wednesday, September 25, 2013 4:39 PM