Using on Excel Office 2010--64 Bit

Oct 13, 2011 at 12:40 AM

When trying to run routine "AllTests in Module Sqlite3Demo I get the Error:

Message box comes up with error:  "Error Initializing SQLite. Error: 193"

I am running 64 bit Office 2010.

I tried the same test on a different computer using Office 2007, and it worked great.

 Is there an issue with running the software on Office 2010?


Oct 13, 2011 at 1:05 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Oct 13, 2011 at 1:09 AM


There is no 64-bit version of the library, which is what you need for the 64-bit version of Excel 2010 (though under the 32-bit Excel 2010 it should work fine when running on a 64-bit Windows). Even on 64-bit Windows 7 the default install for Office 2010 is the 32-bit version.

In this project I'm not actually compiling the SQLite library - I just build a small conversion library to bridge the calling conventions. This is needed because VBA can only use the StdCall calling convention, and SQLite for Win32 is compiled with the C calling convention. In the x64 world there is only one calling convention, so the bridge library would not be needed. However, there is no precompiled 64-bit version of SQLite available.

So supporting 64-bit Excel would entail:

* figuring out how to compile SQLite, and compiling for 64-bit,

* updating the VBA Declares to call the SQLite library directly, and ensuring they are correct for 64-bit - dealing with pointers instead of Longs.

So this is not something I'm likely to do in the foreseeable future, unless there is much demand. I have created an issue in the Issue Tracker, so that people can vote for it though.

I'd be happy to help you go the Excel-DNA / .NET route ( There are 64-bit versions of the System.Data.SQLite assemblies, and Excel-DNA works fine under 64-bit Excel.


Oct 13, 2011 at 11:43 PM

Thanks for the feedback.

Regarding the Excel-DNA/.Net route for Office 2010 64 bit
a.  Has someone used SQLite with Excel-DNA on 64-bit (and is there an example of this OnLine)?
b.  If not, how difficult would this be to do with your assistance (since you graciously offered to help)?
Oct 15, 2011 at 11:51 AM

I don't know of a particular example, but can't imagine any problems.

However, getting into Excel-DNA and .NET can be a steep learning curve. And the API to SQLite will be different since the System.Data.SQLite is an ADO.NET driver. But if you are already comfortable with .NET that's certainly the way to go.

If you just want to get this working on 64=bit Excel, you should probably try to just recompile the native SQLite library for 64-bit. Then the hookup to VBA should be easy enough to figure out. I can probably give this a go in November.