This is a migrated thread and some comments may be shown as answers.

Force Update from Database.

4 Answers 155 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Anders
Top achievements
Rank 2
Anders asked on 27 Jun 2011, 12:47 PM
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.

4 Answers, 1 is accepted

Sort by
0
PetarP
Telerik team
answered on 30 Jun 2011, 03:17 PM
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.
0
Anders
Top achievements
Rank 2
answered on 30 Jun 2011, 04:08 PM
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.
0
Anders
Top achievements
Rank 2
answered on 30 Jun 2011, 04:18 PM
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
0
PetarP
Telerik team
answered on 11 Jul 2011, 07:50 PM
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!

Tags
Getting Started
Asked by
Anders
Top achievements
Rank 2
Answers by
PetarP
Telerik team
Anders
Top achievements
Rank 2
Share this question
or