64 bit dotConnect for Sqlite Problem
Posted: 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
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