Sqlite Visual Studio 2008

Asked

Viewed 85 times

0

I am trying to work with Sqlite in Visual Studio 2008 to make a system for Windows Embedded Compact 7. The problem is that it always gives the following error:

A first chance exception of type 'System.MissingMethodException' occurred in System.Data.SQLite.dll
An unhandled exception of type 'System.MissingMethodException' occurred in System.Data.SQLite.dll   
Additional information: Can't find PInvoke DLL 'SQLite.Interop.066.DLL'.

No matter what I do, I’ve downloaded and tested several DLL’s. I can add the DLL System.Data.Sqlite as a reference, but when trying to add Sqlite.Interop.066.DLL generates the following error:

A reference to 'SQLite.Interop.066.DLL' could not added.

I also tried to put the DLL’s in the folder along with the executable in the emulator (Windows Embedded Compact 7) but also without success.

Anyone ever worked with Sqlite on VS 2008 could help me please? Pat me if you do a step by step :D

1 answer

0


That Library SQLite.Interop.066.DLL is a library for Pinvoke, you do not reference it and yes includes it to be distributed in the directory of your application.

To include it, place it within your project:

  1. Right-click your project and go to "Add" -> "Existing Item";
  2. Select the file SQLite.Interop.066.DLL;
  3. After included in the project, right-click on the file and go to "Properties";
  4. Under "Build Action" select "Compile";
  5. Under "Copy to Output Directory" select "Copy aways";
  • Thanks for your help. I did the following steps, but the error continues. I also tried to manually insert in the project to see if it would recognize, but without success.

  • @Noah, I checked here, in my project I selected the "Compile" option in "Build Action", try this, I edited the question

  • Borges when putting as Compile generates the error "could not be opened", also tried as Content and the rest, but also without much progress. I believe I am using the wrong DLL’s. I thank you for the time you have disposed to help me :)

  • @ Julio Borges , can you tell me what your DLL ? if possible put a link for me to download and test here?

  • @Noah, I last downloaded System.Data.Sqlite from phxsoftware https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki#sqlite-netFx35-Binary-Pocketpc-ARM-2008 version 1.0.66 it turns out it’s the same as the version Voce uses. in my case only has a difference is that the library Interop this with the name Sqlite.Interop.DLL and not Sqlite.Interop.066.DLL, tries to change the name of dll and ve if it works

Browser other questions tagged

You are not signed in. Login or sign up in order to post.