in

System.Data.SQLite

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

Question about using 32-bit and 64-bit libraries

Last post 08-26-2010 3:31 AM by salil.spider. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-26-2010 10:11 PM

    Question about using 32-bit and 64-bit libraries

    Hi - I've read several of the posts in the forum about using 32-bit/64-bit versions of sqlite.net but I am still in the dark about whether certain things are possible or how to go about doing this properly. Here is my issue: I have a vb.net windows forms app using .net framework 2.0 via VS2008. This application uses sqlite.net to access sql databases. I am in the process of creating my setup/installer for the application, and will use the installer creation capability in VS2008. For reference my app was originally a vb6 app that I upgraded, and added the capability to access sqlite. To reach the broadest audience possible, I would like for my app to run on both 32-bit and 64-bit Windows platforms. To keep things as *simple* as possible to maintain, I would like to have only one setup/installer which will install an application that will run on either 32-bit or 64-bit Windows. To do this I set my compile settings to "any cpu". My understanding from reading the forums here is that sqlite has both 32-bit and 64-bit versions, but there is not a single version that runs on both primarily because sqlite (which is include in the sqlite.net assembly) does not have a binary that will work on both 32-bit and 64-bit. 1) Is this understanding correct? And is the implication that I must have two separate versions of my - one for 64-bit which includes the 64-bit version of sqlite.net and one for 32-bit which includes 320bit sqlite.net? If this is not true, how do I get, and use the assembly that runs on both types of OS'es? 2) If I need to have the 32-bit assembly for 32-bit systems and the 64-bit assembly for 64-bit systems, is there any way to include *both* the 32-bit and the 64-bit versions of sqlite.net in my application and how do I set things up so that it would autosense which is the correct assembly to use depending on type (32-bit/64-bit) of the OS? Apologies if my post is not clear or if this already answered in another post, but I am a bit of Noob with .net and do not understand it completely yet. Any help, comments, suggestions, examples or links that could help with this issue is appreciated. Thanks in advance, Michael
  • 08-26-2010 3:31 AM In reply to

    Re: Question about using 32-bit and 64-bit libraries

    In your Project Build option

    Just change the platform target of your project to x86.

    If the project really needs to take advantage of 64 bit then you’d go for option "Any CPU".

    However, option x86 is easier and, in my case it was, more pragmatic
    because it means the code will work on both x86 and x64 systems.

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