SQL Server 2005 Compact Edition for Windows Mobile

I have installed SQL Server 2005 Compact Edition SP2 and the related SDK. I have added System.Data.SqlServerCe as a reference in my Windows mobile 6 Professional project. But every time I try creating a new data source using the data source wizard I get the following message:   "unable to find the requested .Net Framework Data Provider. It may not be installed."
The connection tests fine but i cannot click OK and finish the data source setup because of this elusive error message. I have researched the Web and cannot find any solution.
I am using .Net Framework 2.0 and have installed SP2. I am developing on a Windows XP pro2 desktop.
michouisAsked:
Who is Participating?
 
michouisConnect With a Mentor Author Commented:
Oh well, guess no one knows the diff. between SQL 2005 CE and SQL Compact 3.5.

Either way, I took a blank laptop, loaded it with XP pro and installed all Windows updates (a tonne of them of course) along with the .Net framework and compact framework and all required service packs and now it works. Seems microsoft technologies are extremely HIGH maintenance. Now my Web Site is broken when running on this laptop. Argh! Fix one thing and break another, good old MS.
0
 
michouisAuthor Commented:
Both installed still not working.... I am updating my desktop with ALL current Windows updates for XP pro. Lets see what happens after that.

Maybe I should change to .Net framework 3.5? Or am I just asking for major troubles...???
I will post what happens after the updates.
0
 
michouisAuthor Commented:
By the way, what is the difference between SQL Server 2005 Compact Edition and SQL Server Compact 3.5?? Which one should I be using? I installed them both and when trying to crearte a new data source in my project all I see is SQL Server 205 Compact as a possible new connection. I do not see anything refering to SQL server 3.5 compact. Either way, it does not work when choosing SQL server 2005 Compact. Should I un-install one of them. What is the diff??? I am developing a Windows Mobile 6 (or trying to...) application to run on a professional device (touch screen).
0
 
michouisAuthor Commented:
In the interest of recording a detailed accurate solution here are the 2 main steps to resolve this issue:

1) Make sure to install SQL Server 2005 Mobile Edition Device SDK
2) Make sure the following is in your app.config or machine.config file (found in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG folder):

<system.data>
        <DbProviderFactories>
           
           <add name="SQL Server CE Data Provider" invariant="Microsoft.SqlServerCe.Client" support="3F7" description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

        </DbProviderFactories>
    </system.data>


and voila, it now works fine. You would hope that the SDK install would update the machine.config file but I guess not always... as in my case.

Thanks

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.