locked
Error trying to update model from database RRS feed

  • Question

  •  

    Hello,

     

    I genrate my edmx frm SQL compact. Everything is working find. But whne i try Update from model options, i get the Entity Data Model Wizard Dialog, but in the "Add" Tab i get the following error :

     

    Error retrieving Database information.

    Error Message : Object Reference not set to an instance of an Object.

     

    Deleting exdm and recreate it works fine, but its a little bit..."ennoying" Smile

     

    Any Clue ?

     

    Thanks for your Time.

     

    Regards

     

    Jeff

    Wednesday, June 11, 2008 3:53 PM

Answers

  • We have had reports of this before, but have not been able to reproduce that issue here as of yet.

     

    Wednesday, June 11, 2008 7:47 PM

All replies

  • We have had reports of this before, but have not been able to reproduce that issue here as of yet.

     

    Wednesday, June 11, 2008 7:47 PM
  • Hello,

     

    I can reproduce it each time :

     

    I work with visual studio 2008, SP1Beta1, under vista professionnal

     

    I create a WPF application, framework 3.5 : I call it : App_Test

    I have only one window.xaml

     

    I create a class librairie : I call it : My_Library

    in this library, I add a .dsf file : localdatabase, called MyDatabase.sdf

    I create some tables.

     

    in this Library, I add an ADO.NET entity model, linked to the local database.

    I called it MyDatabase_EDM.edmx

     

    note that in the class library, an app.config is created, with the connectionstring inside.

     

    I create my code in C#, which use the entity on my database, to sort some table for example.

     

    I copy the app.config in my App_Test (if not, the .sdf file is not found)

     

    when I launch the app : it works.- fine. i retreive my datas.

     

    now, I modify the local database (called MyDatabase.sdf), like adding a table, or changing the name of a column.

     

    I go to the Model Browser window, and click right on the Model file,

    I choose "Update Model from database",

    then, I have this error :

     

    "Error retrieving database information.

    Error message: Object reference not set to an instance of an object."

     

    if you could find a solution allowing us to update the edmx files, because if I have to delete it, and create it from scratch, it is long when you have added several association, inheritance, etc... in your Model entity.

     

    thank you for any help.

    Olivier

     

     

     

     

    Monday, July 7, 2008 10:32 AM