64 bit dotConnect for Sqlite Problem

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
aravenwood
Posts: 2
Joined: Sun 30 May 2010 19:56

64 bit dotConnect for Sqlite Problem

Post by aravenwood » Sun 30 May 2010 20:25

Hi, I have .net 2.0 desktop application that I am using to retrieve data from Mozilla Firefox's sqlite databases. When I open the connection object I get this error:

Err #: 5
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

I cannot figure out how to fix this problem - I think it's related to 32/64 bit issues. Is dotConnect Sqlite compatible with 64 bit machines?

Development Machine - No Problems
installed dotConnect (free version) 2.90.140.0/5.0.93.0
VS 2008 - app written in VB 2008 targeting .net 2.0
OS is WinXP Pro 32-bit
Firefox 3.0 32-bit
My application is configured to build for "Any CPU"

Target Machine - Error occurs
Win 7 Home Premium 64-bit
Firefox 3.6 32-bit

Firefox is currently only available as 32 bit app so it runs in Wow mode on 64-bit Win 7 and is installed under Program Files (x86) directory.

My app installs under the normal Program Files directory.

My app directly references devart.data.sqlite and devart.data. The installer installs Devart.Data.dll, Devart.Data.Sqlite.dll, and sqlite3.dll (all from the devart installation) into the install directory for my application

The error occurs on the line that opens the database connection (in bold below). My code is:

Imports Devart.Data.SQLite
Imports Devart.Data

sql = "select moz_bookmarks.title,moz_places.url from moz_bookmarks inner join moz_places on moz_places.id=moz_bookmarks.fk where moz_bookmarks.type='1' and substr(moz_places.url,1,6) 'place:'"

Dim dbPath as string="the path to the places.sqlite database for Firefox"

Dim dt As New DataTable
Dim dr As DataRow
Dim sqLiteConnection1 As SQLiteConnection = New SQLiteConnection()
sqLiteConnection1.ConnectionString = "Data Source=" & dbPath & ";FailIfMissing=False;"
sqLiteConnection1.Open()

Dim sqlda As New Devart.Data.SQLite.SQLiteDataAdapter
Dim sqldr As Devart.Data.SQLite.SQLiteDataReader
sqlda.SelectCommand = New Devart.Data.SQLite.SQLiteCommand
sqlda.SelectCommand.Connection = sqLiteConnection1
sqlda.SelectCommand.CommandType = CommandType.Text
sqlda.SelectCommand.CommandText = sql
sqldr = sqlda.SelectCommand.ExecuteReader
dt.Load(sqldr)
sqldr.Close()
sqLiteConnection1.Close()

I cannot figure out what's going on, why I am having this problem.

Thanks in advance for any help.
Michael

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Mon 31 May 2010 12:45

We've reproduced the problem, we will investigate it and inform you about the results.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Thu 03 Jun 2010 16:30

The problem is that dotConnect for SQLite uses sqlite3.dll library of two versions, one of which is for x86 machines and one is for x64 machines. During installation, the proper library is copied. As I can unserstand, you've copied the x86 version to a 64-bit machine.

I will send you the proper 64-bit library, please check it isn't blocked by your mail filter. You may copy this library to the target machine to avoid installing dotConnect for SQLite there.
Last edited by StanislavK on Mon 18 Jul 2011 13:34, edited 1 time in total.

LordFjord
Posts: 18
Joined: Thu 22 Apr 2010 07:55

Post by LordFjord » Fri 18 Jun 2010 14:58

Hello,
i have run into the same issues just today. I have tried to deploy my application on a 64 bit OS machine.
Could you send me the 64 bit version of sqlite3.dll as well or point me to a location where it is available for download?

I have installed dotConnect for SQLite pro on my 32 bit developer system, so i cant access the 64 bit version of the file, if i understood the previous posts correctly.

A suggestion:
If seperate sqlite3.dll-s are needed for 32 and 64 deployments, then they should be both available somewhere within the installed dotconnect sqlite files.

thanks ahead

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Fri 18 Jun 2010 16:22

You are right: the 64-bit sqlite3.dll library is copied only when installing dotConnect for SQLite on 64-bit machines. Thank you for your suggestion, we will analyze the possibility of implementing it.

I will send you the 64-bit sqlite3 library, please check that it isn't blocked by your mail filter.
Last edited by StanislavK on Mon 18 Jul 2011 13:35, edited 1 time in total.

aravenwood
Posts: 2
Joined: Sun 30 May 2010 19:56

New problem with Firefox 4

Post by aravenwood » Wed 04 May 2011 04:18

Hi - I've been using the dotConnect for SQLite happily for about a year to connect to some of the various sqlite databases used by Firefox. Everything was fine with Firefox 3.x, but it breaks on Firefox 4 databases. I haven't changed any of the code. Found this link which basically states that FF4 requires a newer version of the SQL dll with a slightly different data format. (http://stackoverflow.com/questions/5473 ... ata-sqlite)

Here's the problem - I used a 64-bit compile of the SQLite dll obtained from you (much thanks by the way) so my app could connect to the the FF sqlite db on 64-bit compiles. There is still no publicly available 64 bit version of the sqlite.dll. Would it be possible to get a 64-bit compile from you of the latest version of sqlite? without this my app is dead in the water for all installs on 64-bit systems.

Below is the error data I got from the system, for your files, if you like.

Error data is included below.

Any help would be appreciated!

Thanks in advance,
Michael

HRESULT -2147467259
ErrorCode: NotADatabase {26} Devart.Data.SQLite.SQLiteErrorCode

"File opened that is not a database file
file is encrypted or is not a database"



StackTrace:
" at Devart.Data.SQLite.ab.h()
at Devart.Data.SQLite.ab.a()
at Devart.Common.DbConnectionFactory.a(DbConnectionBase A_0)
at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
at Devart.Common.DbConnectionBase.Open()
at Devart.Data.SQLite.SQLiteConnection.Open()
.... module.vb:line 190" String

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Wed 04 May 2011 14:07

The 3.7.4 version of sqlite3.dll (the one used by Firefox 4) is included into the dotConnect for SQLite installation package since the 3.10.96 build. Thus, you can install the latest version of dotConnect for SQLite to get new sqlite3.dll. Otherwise, you can download the latest sources from the official SQLite site ( http://sqlite.org/download.html ) and compile them following the instructions in our FAQ:
http://www.devart.com/dotconnect/sqlite ... Q.html#q21

tumpliner
Posts: 2
Joined: Thu 15 Mar 2012 14:11

Re: 64 bit dotConnect for Sqlite Problem

Post by tumpliner » Tue 19 Jun 2012 15:53

I have a similar situation to the above. I have a 32-bit platform at home where I do my development with Visual Studio 2005 and dotConnect for SQLite. I use the software tools I make at work. Since I got your dotConnect for SQLite tool its all worked great-- until now. They are starting to use Windows7 on 64-bit machines. My software tools will not connect to the SQLite database anymore. It sounds like what I need is just the oopy of sqlite3.dll for 64-bits which you mentioned earlier in this thread. Would you be able to send me a copy of this file, please? I think you have my email information with my logon info.

Thanks, Tumpliner

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: 64 bit dotConnect for Sqlite Problem

Post by Pinturiccio » Thu 21 Jun 2012 12:22

You can find the x64 sqlite3.dll file in the installation folder "C:\Program Files\Devart\dotConnect\SQLite\x64" (by default).

Post Reply