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

  • Question

  • I am working on a windows forms application. when I run the application on windows 8 (VS2012), the application runs upto an extent and then crashes, giving the exception "{"Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"}".

    I am unable to include sqlite3 dll in the references. when I try adding it and change the Copy Local attribute to True, I am unable to do it as whenever I build the solution, this attribute gets changed to False automatically. also when I try adding SQLite3 through the release\x64 folder, I get an error that the file is not accessible. kindly help me fix this issue!!

    Tuesday, June 4, 2013 6:33 AM

Answers

  • Hi,

    the issue is solved. I added a dll named SQLite.Tests into my solution and removed Sqlite3.dll from it. It worked well and now I am not getting any exceptions.

    Monday, June 10, 2013 8:54 AM

All replies

  • I am working on a windows forms application. when I run the application on windows 8 (VS2012), the application runs upto an extent and then crashes, giving the exception "{"Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"}".

    I am unable to include sqlite3 dll in the references. when I try adding it and change the Copy Local attribute to True, I am unable to do it as whenever I build the solution, this attribute gets changed to False automatically. also when I try adding SQLite3 through the release\x64 folder, I get an error that the file is not accessible. kindly help me fix this issue!!

    Tuesday, June 4, 2013 7:05 AM
  • Hi.

    Take a look at the Mario Cossi reply.

    http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/644c2f9c-f06a-496a-b497-6420a7919fdb/


    Regards,
    Bubu
    http://zsvipullo.blogspot.it

    Please mark my answer if it helped you, I would greatly appreciate it.

    Tuesday, June 4, 2013 9:14 AM
  • Maybe you haven't added the version for the right platform? SQLite is distributed with one X86 (32 bit) assembly and one X64 (64 bit) assembly.

    If your application is a 32 bit application you should use the System.Data.SQLite.dll located in the "bin" directory of the System.Data.SQLite distribution, if it is a 64 bit application you should use the one in "bin\x64".

    However, from looking at the error message a second time I'm not sure if that's it. Are you making native calls to SQLite? In that case you may have to rename the dll to sqlite3.dll.

    As you may know System.Data.SQLite is a bundling of the original native sqlite3.dll and a managed ADO.NET provider (unless you are using some old version in which case I'm not sure - you might need the native sqlite3.dll separately)


    Mark as answer if this solves your problem. ... Best Regards D. Chatterjee MCA, RERF

    Tuesday, June 4, 2013 10:11 AM
  • How do you access the sqlite database? As D. Chatterjee sais there's a .net provider (which needs the msvcr100.dll which may be missing on Windows8 computers).

    Regards,

      Thorsten

    Tuesday, June 4, 2013 10:52 AM
  • Hi,

    doublepost, see the replies of this thread:

    http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/cd03d10a-1dd8-486e-9ffc-47c06f7552de

    Regards,

      Thorsten

    Tuesday, June 4, 2013 10:55 AM
  •  I downloaded the 32 bit SQLite3 and added it to my solution. thereafter I got the error
    {"Unable to find an entry point named 'sqlite3_open_v2' in DLL  'sqlite3'.":""}.

    I also tried renaming it to System.Data.SQLite but it didn't work too. I am not able to add this dll as a reference. when I do, I get an error saying that the file is not accessible. I have also unblocked the dll after downloading it. still no breakthrough!!
    Tuesday, June 4, 2013 11:21 AM
  • Hi,

    I think, you're trying to reference the native dll from a managed application. Use the .net Dataprovider instead...

    http://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki

    Regards,

      Thorsten

    Tuesday, June 4, 2013 11:40 AM
  • Hi Thorsten,

    I tried using the above mentioned data provider but it didn't help me overcome the error. I am still getting the same error.

    Anyways, thanks for the reply.

    Tuesday, June 4, 2013 12:51 PM
  • Hi, what did you try to do?

    To work with an sqlite db you need to add a reference to the System.Data.Sqlite.dll, you dont need to add references for the Sqlite3.dll

    http://system.data.sqlite.org/index.html/doc/trunk/www/faq.wiki#q10

    In the versions I used so far, I also needed the SQLite.Interop.dll being present in the Directory where the System.Data.Sqlite.dll resides (could be for instance  the output dir).

    Regards,

      Thorsten


    Tuesday, June 4, 2013 1:55 PM
  • maybe this will be helpful:

    http://www.dreamincode.net/forums/topic/157830-using-sqlite-with-c%23/

    Regards,

      Thorsten

    Tuesday, June 4, 2013 1:58 PM
  • Hi Thorsten,

    Thanks for the reply. According to the link <http://system.data.sqlite.org/index.html/doc/trunk/www/faq.wiki#q10>

    it is said that the necessary visual c++ runtime distributable should be installed. I installed it and ran the code but it didn't help.

    still the same exception.

    Regards,

    Sid

    Thursday, June 6, 2013 5:21 AM
  • Hi,

    the issue is solved. I added a dll named SQLite.Tests into my solution and removed Sqlite3.dll from it. It worked well and now I am not getting any exceptions.

    Monday, June 10, 2013 8:54 AM