in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Can't find PInvoke DLL 'SQLite.Interop.059.DLL'.

Last post 01-27-2010 5:59 AM by mmsaffari. 33 replies.
Page 1 of 3 (34 items) 1 2 3 Next >
Sort Posts: Previous Next
  • 10-26-2008 2:27 PM

    Can't find PInvoke DLL 'SQLite.Interop.059.DLL'.

    Hi All,

    I originally posted this as a reply in a related post in the bus forum, but I'm thinking it's probably not a bug, and just something I'm doing wrong.

    I am using version 059, deploying to the MS Windows CE 5.0 emulator. I've added System.Data.SQLite.dll as a reference, so Visual Studio automatically deploys that DLL to the emulator, but it doesn't deploy the Interop DLL of course, so I simply manually copied it to the device using the Remote File Viewer. However, when I try to connect to the DB, it throws this error:

     Can't find PInvoke DLL 'SQLite.Interop.059.DLL'.

    I've tried putting the Interop DLL in the \windows folder and that didn't help. I'm pretty new to CE development, so I'm guessing I'm doing something wrong here, but I have no idea what it might be. Shouldn't it work with the Interop DLL manually copied to the application folder?

    Note that I've tried 060 with the same results. I also tried an older version from before the unmanaged stuff was split out, and in that case it says "Can't find PInvoke DLL 'System.Data.SQLite.DLL'.

    Note that it works fine on an *actual* Windows CE 5.0 device ... just not in the emulator. This makes me think something is missing from the emulator, but I have no clue what it might be.

    Thanks for any pointers!

    -Ross

     

  • 10-28-2008 6:52 PM In reply to

    Re: Can't find PInvoke DLL 'SQLite.Interop.059.DLL'.

     Does anyone have anything to suggest for me to try? It just seems very strange that it works fine on a real Windows CE 5 device, but not on the emulator. I'm at the end of my rope. :(

  • 10-28-2008 7:04 PM In reply to

    Re: Can't find PInvoke DLL 'SQLite.Interop.059.DLL'.

    Sorry I've been swamped at work and haven't had time to answer a lot of posts on the forums.

    I can't duplicate the problem here with 060.  It's working fine for me on the emulator.  059 was definitely broke, and 060 is working fine.

     

  • 10-28-2008 7:32 PM In reply to

    Re: Can't find PInvoke DLL 'SQLite.Interop.059.DLL'.

     Thanks for the reply Robert. I'll try 060 again in a small test project and see what happens

  • 10-28-2008 7:58 PM In reply to

    Re: Can't find PInvoke DLL 'SQLite.Interop.059.DLL'.

    Still no luck. :( I made a simple Windows CE 5 project with a button. The click handler for the button tries to open a SQLite file. It dies with this exception:

    {"Can't find PInvoke DLL 'SQLite.Interop.060.DLL'."

    Here's the stack trace from the exception:

    at System.Data.SQLite.SQLite3.Open()
    at System.Data.SQLite.SQLiteConnection.Open()
    at SQLiteTest.Form1.button1_Click()
    at System.Windows.Forms.Control.OnClick()
    at System.Windows.Forms.Button.OnClick()
    at System.Windows.Forms.ButtonBase.WnProc()
    at System.Windows.Forms.Control._InternalWnProc()
    at Microsoft.AGL.Forms.EVL.EnterMainLoop()
    at System.Windows.Forms.Application.Run()
    at SQLiteTest.Program.Main()

    I've posted my test project here:

    http://www.metacraft.com/tmp/SQLiteTest.zip

    This just doesn't make any sense. Any ideas?

    EDIT: It works fine on a PocketPC emulator ... just not the Windows CE emulator.

  • 10-28-2008 8:10 PM In reply to

    Re: Can't find PInvoke DLL 'SQLite.Interop.059.DLL'.

    ... I assume you've deployed SQLite.Interop.060.dll with the rest of your binaries?

     

  • 10-28-2008 9:44 PM In reply to

    Re: Can't find PInvoke DLL 'SQLite.Interop.059.DLL'.

     Yeah, I just manually copied it into the same folder as the executable. That's all I need to do with the interop DLL, right?

  • 10-29-2008 5:56 AM In reply to

    Re: Can't find PInvoke DLL 'SQLite.Interop.059.DLL'.

    Perhaps you can build System.Data.SQLite in debug mode and step through the open() function to find out where and why it is failing. Robert mentioned in http://sqlite.phxsoftware.com/forums/p/1409/6187.aspx#6187 that he discovered the problem with SQLite.Interop.059.DLL by examining the error returned by LoadLibrary().

  • 10-29-2008 6:14 AM In reply to

    Re: Can't find PInvoke DLL 'SQLite.Interop.059.DLL'.

    So the error I'm seeing may not be the actual problem? I'll try compiling the source. Thanks.
  • 10-29-2008 6:32 AM In reply to

    Re: Can't find PInvoke DLL 'SQLite.Interop.059.DLL'.

     

    rcarlson:
    So the error I'm seeing may not be the actual problem?

    It certainly is possible. In the original report (http://sqlite.phxsoftware.com/forums/p/1409/6187.aspx#6187), the DLL was found but the actual problem was that the it was marked with the wrong Windows version number, despite the error message saying that the DLL could not be found.

  • 10-29-2008 6:50 AM In reply to

    Re: Can't find PInvoke DLL 'SQLite.Interop.059.DLL'.

     Gotcha ... I'll give it a try tonight and report back. Thanks.

  • 10-29-2008 8:20 PM In reply to

    Re: Can't find PInvoke DLL 'SQLite.Interop.059.DLL'.

     No luck ... I added the System.Data.SQLite project to my test solution, and it still dies with a MethodNotFound exception, with this message: "Can't find PInvoke DLL 'SQLite.Interop.060.DLL'."

    The line it dies on is:

    int n = UnsafeNativeMethods.sqlite3_open_interop(ToUTF8(strFilename), (int)flags, out db);

    I've tried it with 059, 060, and even tried reverting back to 058, and that one just says it can't find PInvoke DLL 'System.Data.SQLite.DLL'.

    I'm really stuck here ... I hope you guys can help! Thanks.


  • 10-29-2008 8:30 PM In reply to

    Re: Can't find PInvoke DLL 'SQLite.Interop.059.DLL'.

    What emulator are you using?

     

  • 10-29-2008 8:44 PM In reply to

    Re: Can't find PInvoke DLL 'SQLite.Interop.059.DLL'.

     I'm using this one from Microsoft:

    http://www.microsoft.com/downloads/details.aspx?FamilyID=A120E012-CA31-4BE9-A3BF-B9BF4F64CE72&displaylang=en

    I'm using the sample O/S image that it includes.

    Note that it is not working on a physical WinCE 5 device either. I stated above that it does work on an actual device, but I don't have that device anymore. The device that I now have, gives me the same error as the emulator. The device I'm working with is this:

    http://www.qsicorp.com/product/vehicle/treq-dx.php

  • 10-29-2008 10:16 PM In reply to

    Re: Can't find PInvoke DLL 'SQLite.Interop.059.DLL'.

    Is it an ARM emulator?  The pinvoke DLL is compiled for ARM processors.

     

Page 1 of 3 (34 items) 1 2 3 Next >
Powered by Community Server (Commercial Edition), by Telligent Systems