Force Update from Database.

5 posts, 0 answers
  1. Anders
    Anders avatar
    12 posts
    Member since:
    Apr 2011

    Posted 27 Jun 2011 Link to this post

    Hi

    I got my Database in a rlinq file, but by a mistake I deleted a table inside the visual designer.
    Now I was expected to get the table back simply by using Update from Database... 
    I have no problem finding it, but it never gets added back.

    I tried with visual studios undo function, but that just gave a sync problem, since I removed a properti from within the Database, and when I try Update from Database.. It don't know that there has been a change.

    Is there a way to force an Update from Database..?  

    Right now I have to delete my rlinq file and start over.

  2. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 30 Jun 2011 Link to this post

    Hi Anders,

     I have tested that and it works on my machine. Please note that I have tested against the 2011.1.411.2 version.
    Can you please share with me how did you remove the table from your model?
    What I did is right click on the table and say Remove Table. After that I updated from the database and chosen only the removed table. Upon clicking finish the table was present in the model again.

    Best wishes,
    Petar
    the Telerik team
    Q1’11 SP1 of Telerik OpenAccess is available for download; also available is the Q2'11 Roadmap for Telerik OpenAccess ORM.
  3. DevCraft banner
  4. Anders
    Anders avatar
    12 posts
    Member since:
    Apr 2011

    Posted 30 Jun 2011 Link to this post

    Hi I use the same version

    And I simply select the table and presses Delete.
    [See delete table.png]

    Then I Right click and select "Update from Database..
    Select all the Tables including the one I used the delete buttom one.
    But I end up with a empty screen shown in [delete table2.png] 


    Just as a not, I created the rlinq file from a database i designed in Ms Sql Server 2008 R2
    If you need I could try and make a small sample project.
  5. Anders
    Anders avatar
    12 posts
    Member since:
    Apr 2011

    Posted 30 Jun 2011 Link to this post

    Just managed to get it back with the Model Schema Explorer, by dragging the table over to my diagram.

    Think I was just expecting it to behave like the ADO.NET Entity Data Model.
    Where if you delete an table, have the option to Add it again when you run the "Update Model From Database"
    See included Picture
  6. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 11 Jul 2011 Link to this post

    Hello Anders,

     What you have deleted is just the class representation of your table. If you would like to remove a table from your model you need to unmap it (or delete the class to which is mapped) than open the schema explorer, right click on the very same table and choose remove table. This should remove the table from your model and next time you run the Update From Database wizard you should see this table as a new one.

    Regards,
    Petar
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Back to Top
DevCraft banner