Vista x64, gadget development, OLEDB error: "provider not found"
I am developing a Vista gadget. The gadget works with the local .mdb database used by OLEDB. The code looks like this:
var cs = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + getDbFilePath() + ";Persist Security Info=False;";
var connection = new ActiveXObject("ADODB.Connection");
connection.ConnectionString = cs;
It works under Vista 32, but with x64 code with the message:
The provider was not found. It may not be installed correctly.
When I run the javascript file from the command line, there are no errors. getDbFilePath () returns the correct path, database exists, etc.
How to fix it? Maybe it makes sense to use a different database provider?
thanks
There is no native Jet image registered / available for x64 - it is only available on 32bit processes on x64. The sidebar executable runs as its own x64 image - hence it fails.
Your choices look limited:
- Give up Jet, for example. switch to one of SQL Compact Edition, SQL Express or similar
-
Wrap your Jet calls in a surrogate 32-bit COM object. Register the object as non-working in the 64-bit registry. eg.
-
X64 support
Trying to get the sidebar to work in 32-bit seems difficult / impossible, not to mention unreasonable.
source to share