VS 2010 and SQL CE 3.5

  • Thread starter Thread starter Sergio Torres
  • Start date Start date
S

Sergio Torres

I am receiving an error message when trying to connect to a SQL CE 3.5
database:

"Unable to load the native components of SQL Server Compact corresponding to
the ADO.NET provider of version 8080. Install the correct version of SQL
Server Compact. Refer to KB article 974247 for more details."

I checked both (32 and 64 bits) set of SQL CE files and all of them have
version 3.5.8080.0

Any ideas?

This is how I get to the problem:
I installed Windows 7 Pro 64 bits (fresh install). Updated it.

I installed VS 2010 version 10.030319.1 RTMRel (Full Install, including SQL
Server Express 2008 32 bits).

I created a new windows project targeting .NET 4.0 and copied to it all
forms and resources from a project I was developing using VS 2008 (targetting
..NET 3.5). This project connects to the SQL CE 3.5 database.

I added all needed references to my new windows project.

I added a connection string to my SQL CE database in my project settings.
Tested it. It worked ok. I called it "SACConnectionString".

I used Server explorer to connect to my SQL CE database and it worked ok.

When I try to execute:

_conn = New SqlCeConnection(My.Settings.SACConnectionString)

I get the error message.

Any help will be highly appreciated. Thanks.

--
Sergio Torres C.
(505) 897 2041
___________________
http://www.stcsys.com
___________________
 
By the way, I followed to instructions of KB article 974247 and tried to
install the SQL CE 3.5 it links to, and got an error message saying "you
aready have installed a more recent version".

Does anybody now what can I do to solve this problem?

Thanks
--
Sergio Torres C.
(505) 897 2041
___________________
http://www.stcsys.com
___________________
 
I found and solved the problem, although I don't understand why it was a
problem and why now it works.

The problem was that I added the reference to System.Data.SqlServerCe by
using the option "Add Reference - Browse" and browsing to the SQL CE 3.5
installation folder (C:\Program Files\Microsoft SQL Server Compact
Edition\v3.5\Private), instead of using the "System.Data.SqlServerCe "
offered under "Add reference - .NET".

Once I changed the reference, I was able to access my database.
 
Thanks for providing the (self found) resolution.

Most people don't do that , and then the thread doesn't help future readers.
 
Back
Top