Sunny Sandeep
Sunny Sandeep

Reputation: 1011

Error on working with database with vb.net

I am working on vb.net application in which i am working on making crystals reports. I am database as Ms-Access.I did following to open the connection of Ms-Access:

Dim con As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0; data source=database.mdb")
con.open()

but when controls comes to con.open(), it shows the following error:

The 'Microsoft.Jet.Oledb.4.0' provider is not registered on the local machine

Can anyone help me.

Upvotes: 0

Views: 124

Answers (2)

tezzo
tezzo

Reputation: 11105

Microsoft.Jet.OLEDB.4.0 provider is not 64-bit compatible. You can compile your application changing platform target from 'Any CPU' to 'x86'.

Upvotes: 1

Sunny Sandeep
Sunny Sandeep

Reputation: 1011

The Answer what i have found to my above asked question is discussed below:

Actually Microsoft.Jet.Oledb.4.0 not work for 64Bit machine.

So, it would be better to use Microsoft.ACE.OLEDB.12.0 for 64 bit system. Before to use we should check is it 32 bit or 64 bit system. If the system is 32 bit then use .JET.OLEDB else use ACE.OLEDB.

The following link can be preffered for downloading AccessDatabaseEngine

http://www.microsoft.com/download/en/details.aspx?id=13255

I hope it may help someone.

Upvotes: 1

Related Questions