Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




28 posts

Geek


Topic # 84236 27-May-2011 07:11
Send private message

I am currently trying to figure out why my software refuses to run on Windows 7 x64 Home Premium.

When a user tries to log in the software queries a .mdb to authenticate the user however it will throw the following error:

"System.InvalidOperationException: The .Net Framework Data Providers require Microsoft Data Access Components (MDAC). Please install MDAC version 2.6 or later."

On face value it seems like an easy fix (and maybe is for some of you ;)) but MDAC is no longer supported in Windows Vista or Windows 7 being replaced by Windows Data Access Components (WDAC), which to my knowledge, are built into the core directly.

Currently I have 2 scenarios in mind:

1: Windows 7 Home Premium does not include some of the data access components required by the software with the solution being upgrading my licence to Professional or higher.

2: The software is trying to use a legacy data provider that is no longer supported in WDAC. The connection string I am using is: "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=pathtodb.mdb";

According to my research that connection string is OK.

I should also mention that this works on a system running Windows 7 x86 Professional edition.

Any help with this would be greatly appreciated.

Troy 

View this topic in a long page with up to 500 replies per page Create new topic
 1 | 2
491 posts

Ultimate Geek
+1 received by user: 67

Subscriber

  Reply # 474661 27-May-2011 08:21
Send private message

Hi,

I am assuming you are referring to a software you are developing yourself, right?

Do you HAVE to use the jet provider?
I had success accessing a mdb database using more recent providers like Microsoft.ACE.OLEDB.14.0.
(There is also a version 12, not sure which one you need)

This page here should let you download installers for the providers (choose x64)



28 posts

Geek


  Reply # 474662 27-May-2011 08:24
Send private message

Yeah it's software I am developing.

No I don't have to use Jet, in fact I was actually looking for an alternative the other day but all the examples I found were indicating Jet. 

Thanks for your help I'll give that a go.

Troy 

 
 
 
 


1196 posts

Uber Geek
+1 received by user: 110


  Reply # 474666 27-May-2011 08:54
Send private message

You might find your connection string will be the issue.

Couple of things I would try would be to use Provider=OLEDB or to drop the .4.0 part of your existing provider string. Also you may need to specify a Driver clause.




Software Engineer

 




28 posts

Geek


  Reply # 475027 28-May-2011 02:21
Send private message

I tried this, no joy.

I tried installing the x64 ODBC driver and it said I couldn't as I already had 32 bit office products installed so I installed the 32bit driver. It gave me the same error as in my original post. I then uninstalled office and the 32 bit driver so I could install the 64 bit driver and again, same error.

I know the provider (Microsoft.ACE.OLDB.12.0) works as I installed the driver on my dev pc (running xp) and tested them and everything works fine. I also tested the new provider on the 32bit Windows 7 Professional machine that was working with the previous data providers and it worked fine there too.

The only thing I can think of now is the difference in the licence (Home Premium vs Professional). How likely is it that this is causing my problem? Is it possible Home Premium doesn't ship with some of the data access components? Initially I thought so but the more I think about it the less possible it seems but I don't know what else it could be except perhaps I need to compile for 64bit architecture, install the 64bit drivers and buy 64bit office (didn't think this was necessary. Most of the apps I install on my 64bit pc are 32 bit binaries and they all work fine).

EDIT: I have googled this quite extensively and everyone who is reporting similar issues is using some Home Premium licence whether it be Vista or 7...  

gzt

9070 posts

Uber Geek
+1 received by user: 1245


  Reply # 475068 28-May-2011 11:11
Send private message

No idea. It's been a while, but I recall MDAC was a constant nightmare across different platforms.

Some suggestions:

Home premium cannot join a domain - which can impact some security/permissions related things which can have strange and unexpected consequences:


  • Try putting the mdb into a user directory like 'my documents'

  • Try disabling UAC

  • Have a close look at the Data sources (ODBC) in Administrative Tools

  • Specify a user name and password even if you do not need one


Also, maybe a later Access redistributable will magically resolve the situation.


gzt

9070 posts

Uber Geek
+1 received by user: 1245


  Reply # 475072 28-May-2011 11:35
Send private message

This is interesting: http://support.microsoft.com/kb/942976

"If you build and then run an application as a 32-bit application on a 64-bit operating system, you must create the ODBC data source by using the ODBC Administrator tool in %windir%\SysWOW64\odbcad32.exe."

1196 posts

Uber Geek
+1 received by user: 110


  Reply # 475155 28-May-2011 16:04
Send private message

Adding to my earlier post, I am assuming your database in a Microsft Access one, but you do not state what programming language your application is developed in.

I have found that the issue often comes down to an incorrect connection string.

A OLE DB connection string provider contains the provider name and version to use (progId) for example Jet.4.0 refers to jet version 4.0 (assuming you have that version installed. The ProgId is optional, if not specified the most recent version of the driver will be used. I suspect this is your issue.

The first thing I would do is remove the progId portion from the connection string, if that does not work, I would try a different provider (such as OLEDB).

You may also need to apply the driver property to the connection string if you want to use a specific driver (the Driver= clause).





Software Engineer

 




28 posts

Geek


  Reply # 475160 28-May-2011 16:12
Send private message

OK good advice, thanks. 

It is developed in C#

Ill give it a go on Monday.  

8019 posts

Uber Geek
+1 received by user: 385

Trusted
Subscriber

  Reply # 475305 29-May-2011 01:41
Send private message

If you are considering changing the database I would recommend http://www.sqlite.org/

The .NET adapter/library for it is here http://system.data.sqlite.org/



28 posts

Geek


  Reply # 476896 2-Jun-2011 05:06
Send private message

Sorry for taking so long to post feedback, got busy fixing something else :P

I think it may actually be because it has been compiled in VS 2008 for "Any CPU". I've read that this can cause issues when it tries to load 32 bit drivers from a 64 bit application (which it will be).

EDIT: Similar to what gzt mentioned above.

gzt

9070 posts

Uber Geek
+1 received by user: 1245


  Reply # 476963 2-Jun-2011 10:25
Send private message

Thanks for the update, I like to keep up with MDAC issues. If you can confirm targeting x86 if you have the opportunity. ;  ) 

1196 posts

Uber Geek
+1 received by user: 110


  Reply # 477212 2-Jun-2011 21:10
Send private message

teasp00n: Sorry for taking so long to post feedback, got busy fixing something else :P

I think it may actually be because it has been compiled in VS 2008 for "Any CPU". I've read that this can cause issues when it tries to load 32 bit drivers from a 64 bit application (which it will be).

EDIT: Similar to what gzt mentioned above.


Is this a web-app? 




Software Engineer

 


Infrastructure Geek
4043 posts

Uber Geek
+1 received by user: 193

Trusted
Microsoft NZ
Subscriber

  Reply # 477252 2-Jun-2011 22:50
Send private message

we built something that needed to be targeted specifically at x86 because it wouldnt work when we dropped it on x64 platform - it was also trying to reference an ODBC driver. Probably the same issue. Default was initialy Any CPU.




Technical Evangelist
Microsoft NZ
about.me/nzregs
Twitter: @nzregs




28 posts

Geek


  Reply # 477276 3-Jun-2011 06:40
Send private message

Hey guys,

Quick update; I have tried running the program targeted for x86 with various combinations of the connection strings provided in previous posts. This hasn't worked :/

It still complains about the msdart.dll and I'm starting to think that this might be corrupt. I'll have a go at replacing the dll and re registering it.

EDIT: No it's a desktop application. 

gzt

9070 posts

Uber Geek
+1 received by user: 1245


  Reply # 477279 3-Jun-2011 06:59
Send private message

teasp00n: It still complains about the msdart.dll [...] 

What is the exact error message there?

 1 | 2
View this topic in a long page with up to 500 replies per page Create new topic



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

Vodafone TV — television in the cloud
Posted 17-Oct-2017 19:29


Nokia 8 review: Classy midrange pure Android phone
Posted 16-Oct-2017 07:27


Why carriers might want to embrace Commerce Commission study, MVNOs
Posted 13-Oct-2017 09:42


Fitbit launches Ionic, its health and fitness smartwatch
Posted 12-Oct-2017 15:52


Xero launches machine learning automation to improve coding accuracy for small businesses
Posted 12-Oct-2017 15:45


Bank of New Zealand uses Intel AI to detect financial crime
Posted 12-Oct-2017 15:39


Sony launches Xperia XZ1, a smartphone with real-time 3D capture
Posted 11-Oct-2017 10:26


Notes on Nokia’s phone comeback
Posted 10-Oct-2017 10:06


Air New Zealand begins Inflight Wi-Fi rollout
Posted 9-Oct-2017 20:16


The latest mobile phones in perspective
Posted 9-Oct-2017 18:34


Review: Acronis True Image 2018 — serious backup
Posted 8-Oct-2017 11:22


Lenovo launches ThinkPad Anniversary Edition 25
Posted 7-Oct-2017 23:16


Less fone, more tech as Vodafone gets brand make-over
Posted 6-Oct-2017 08:16


API Talent Achieves AWS MSP Partner Status
Posted 5-Oct-2017 21:20


Stellar Consulting Group now a Domo Partner
Posted 5-Oct-2017 21:03



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.