Wednesday, March 7, 2012

Database Diagram

How to programmatically work with Database Diagram object:
create, drop, add/remove tables...

Thanks, Sergey.

Hi Sergey

Unfortunately with latest version of Database Diagrams you cannot programmatically call into the Database Diagrams objects. This is something that we are looking into for future releases. At this point your best option would be to generate a DDL script and manipulate the table (object) in that fashion

Regards

Mairad

|||

Is there any way of saving diagrams outside the database?

Every time I re-install my database, I lose the diagram and have to manually re-create it.

Even copying the entire database doesn't copy the diagram.

|||

The database diagrams are stored in 'dbo.sysdiagrams'. Each schema is stored in a single row with the internal diagram structure serialized in the 'definition' column i.e. blob.

While is would be very difficult modifying this data you can definitely save and restore the blob.

No comments:

Post a Comment