If you have scenario like this:
- In your C# / VB.NET application you are using Microsoft Access database (MDF file)
- Target machines are 64 bit machines (Vista 64 or some of the Windows Operating System flavors
- On target machines, where you plan to deploy solution, you installed Microsoft 2007 Office System Driver: Data Connectivity Components
- And still, you are experiencing error like this:
System.InvalidOperationException: The 'Microsoft.Jet.OLEDB.4.0' provider is
not registered on the local machine.
Check if your application is setup for any CPU (Properties / Build / Platform target) which is default. If that is the case, change it to x86 – at the moment, there are no 64bit drivers for Microsoft Office, so only 32bit applications will work as expected.
I was trying to do upgrade of SQL Express 2005 to SP1 version on one of development machines.
Each time, attempt failed with not-so-helpful-message:
SQL Server Setup did not have the administrator permissions required to rename a file: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Template Data\mssqlsystemresource1.ldf. To continue, verify that the file exists, and either grant administrator permissions to the account currently running Setup or log in with an administrator account. Then run SQL Server Setup again.
Quick Google did the trick: solution was described in KB 918693 (to be precise: workaround).
However, at first glance, I failed to execute workaround – there are couple of errors in mentioned article:
1. If typing
SQLCMD do not connect to local instance of SQL 2005 Express, try with full name of instance:
2. “beautified” quotes in article’s code won’t exactly help; so, if you want quick copy / paste, use code from here:
EXEC sp_configure 'user instances enabled',0
3. Step three, apart from quotes, has one column name wrong, so again, use this code:
SELECT owning_principal_name, instance_pipe_name
FROM sys.dm_os_child_instances WHERE heart_beat = 'alive'
4. And here is script for final step, after reinstallation:
EXEC sp_configure 'user instances enabled',1
BTW, how can I report errors spotted in KB article to Microsoft? Anyone?
Databases are very important in my area of work; as a simple storage (but rarely), as a smart relational actor in the game or even as replacement for application server, holding mass of business logic rules.
There are more and more very free and very powerful databases on database market. Some are completely free, and some are “entry” models for big guys. Whatever reasons are, they make developer life much, much easier.
One of my favorite free databases is Firebird – and it reached very important milestone: version 2.0. There is long list of enhancements, but to mention just some:
- Table size is no longer limited to 30 Gb
- Password encryption now uses a more secure password hash calculation algorithm (SHA-1), encryption becomes entirely server-based and password login is now required from any remote client
- new interface for plugging in international character sets, including enhanced Unicode support, along with a number of new and corrected collations
Download link: http://www.firebirdsql.org/index.php?op=files&id=engine_200
Let me mention other favorites:
MS SQL Server Express 2005 along with free management tool: SQL Server Management Studio Express – fast and sleek combination for rapid development under .Net 2.0 environment. There are of course limitations, but for most small and middle project this will work just fine.
Also, if you are using older version of SQL 2000 or lite version called MSDE please consider migrating to sQL 2005 – SQL 2000 family won’t be supported on Vista.
Oracle Database 10g Express Edition – lite version of “big” Oracle 10g. Perfect companion is Quests’s TOAD Free.