Can't work with SQL Server 2005 Compact Edition

Oct 13, 2007 at 2:12 PM
Now I am working on a small windows application, and I want to use the Sql server 2005 CE as the database, and also I would very like using Repository Factory to generate the data access code. But when I want to add a database connnection. The chose data source window don't list the Microsoft Sql Server 2005 Ce datasource. So I can't create a data connection in this way.
But I can add a data connection manauly in the app.config looks like:
<connectionStrings>
<add name="LENSConnectionString" connectionString="Data Source =".\LENS.sdf"" providerName="Microsoft.SqlServerCe.Client" />
</connectionStrings>
the connectionString is commonly used in sql server ce development. Then I used this connection in the create business entities from database. the factory tells me:
There was an error tring to obtain the database metadata information.

I first think that it was because of lack the reference of System.Data.SqlServerCe. After I add that reference, it still didn't work.