0

I need to create a simple master/details form that collects data from a database, make some changes and save them. I use SQL Server Compact 4.0(simple by ErikEJ). I have try Master Details Demo.

This is my Database:

enter image description here

But when I followed the Entity Data Model Wizard I get the following error:

enter image description here

It seems that it's not supported by Visual Studio 2013. Any suggestion would be appreciated.

Thanks in advance.

Glen Thomas
  • 10,190
  • 5
  • 33
  • 65
Cyberguille
  • 1,552
  • 3
  • 28
  • 58

1 Answers1

1

I wrote the "Simple" DDEX provider, and it is only meant for running the EDMX Wizard in order to create a EDMX or Code First from Database model. (That is why it is called simple). So it does not support working with DataSets and DataAdapters. In addition you should not be using DataSet with SQL Server Compact due to the memory overhead. Use SqlCeResult set if possible: https://msdn.microsoft.com/library/bb219485.aspx

ErikEJ
  • 40,951
  • 5
  • 75
  • 115
  • First of all thanks, I followed the tutorial that you gave me above with Database MailStormDB.sdf(created with SQL Server Compact 4.0(simple by ErikEJ)), but when I try on the server Explorer to right-click on one of my tables in the popup it doesn't shows **New Query**. Anyway I did query and ran the application, but the data is not displayed. – Cyberguille Aug 05 '15 at 15:00
  • Do you have several copies of the same database? Look in bin/debug? – ErikEJ Aug 05 '15 at 15:29
  • Yes, I have two copies and in the bin\debug I have one – Cyberguille Aug 05 '15 at 15:42
  • Now I try to follow exactly the [tutorial](https://msdn.microsoft.com/en-US/library/bb219485(v=sql.90).aspx) with my Database and when execute the line `SqlCeResultSet resultSet = cmd.ExecuteResultSet(ResultSetOptions.Scrollable | ResultSetOptions.Updatable)` throw this exception: __An unhandled exception of type 'System.InvalidOperationException' occurred in System.Data.SqlServerCe.dll Additional information: ExecuteResultSet: Connection property has not been initialized.__ – Cyberguille Aug 05 '15 at 18:31
  • I show my code in a new question: [SQL Server Compact Edition Data Access with the SqlCeResultSet in Visual Studio 2013](http://stackoverflow.com/questions/31864259/sql-server-compact-edition-data-access-with-the-sqlceresultset-visual-studio-201) – Cyberguille Aug 06 '15 at 19:37