I just did a schema compare where the source is a database and the target is my project. There should have been one difference detected (in a stored proc that needed to be updated in my project). However, the schema compare did not detect this difference. After a bit of snooping I think I've discovered the following:
- When a schema compare is done and the target is a project, the compare does not compare the actual source files in the project but uses the design time database.
- In theory, the design time database should match exactly the source files in the project. However, somehow, in my case, this isn't true. I have a stored proc in my project that is older than the version in the design time database.
My questions are this. How can this happen And, what can I do to 'refresh' the design time database (besides deleting it)
Thanks - Amos.

Schema Compare Problem #6
Bruce Bukovics
Amos -
Are you still blocked by this issue, or has Chuck gotten you unblocked
Curtis Bridges
I asked if you wanted to do a trace to find out why they get out of sync.
-GertD
RPagels
Gert,
I'm not sure I would consider the issue closed. The official response from Microsoft is that the Project and design time database should never get out of synch. However, my experience is that it can get out of synch very easily. And, I just read the following blog by Jeff Lynch (Microsoft MVP) who also makes the same claim. So, IMO, there is a very real problem with DBPro in this area.
BTW Gert, you made the statement in a different thread a week or so ago that the design time database is nothing more than a scratch compile time validation database. It seems it is much more than that. I've concluded, as has Jeff Lynch, that schema compares use the design time database and not the project files. Since it appears that the design DB can easily get out of synch with the projects, this is a serious issue (IMO).
Amos.
(http://codebetter.com/blogs/jeff.lynch/archive/2007/02/02/Visual-Studio-Team-Edition-for-Database-Professionals_3A00_-Schema-View-Synchronization.aspx).
systech
I am partially unblocked. Clicking Refresh in the Solution Explorer synchs the project with the design time database. I still down know under what conditions this can happen. This seems to happen somewhat frequently to us.
Amos.
John Sobernheim
First off, I'm an MVP for Commerce Server and no expert at DataDude. I use DataDude almost every day and really like how it works, but Gert is the "expert". If your DBPro project schema (design database) is out-of-sync with your SQL objects, then running a trace is a great way to see what's happening. The reason for my blog post was to explain how to "resync" the schema and objects "if" they get out of sync. I've experienced this (very minor issue) occasionally when using a virtual machine for my development environment which uses a physical TFS server for source control. I have no idea what causes this issue but in my case it "looks" like virtual machine network latency or high load on our TFS server. It also seems to happen only when working with larger projects (lots of objects in the database). I haven't been able to repro this issue with any consistency and the "resync" work-around seems to work just fine for me.
If the issue still bothers you, I'd recommend running a trace on the design database and then starting VS to get a better idea of what's happening just as Gert suggests.
Jeff Lynch
MVP Windows Server System - Commerce Server
http://codebetter.com/blogs/jeff.lynch
nbrege
Jeff,
I have confirmed with Gert via a conference call that when a Get Latest is done on a project, the design database is not updated. This is by design. Therefore, it is possible for the design database to get out of synch with the project. The solution is to either Refresh from the Solution Explorer, or, better yet, Rebuild the project.
Thanks - Amos.
DKB
I did not get any more response on this, should I consider this issue closed
-GertD
Jorijn--
I've tried a few different things and I can't figure out how you could get into the situation where the design time database has a newer version of the proc than your project. If you could give us the steps for how you got into that situation, we would appreciate it.
As for refreshing the design time database, you can hit the refresh button in solution explorer, which will cause the project to completely refresh the design time database. If you just want to refresh one object, you can make a small change to the object, like add a space, then save the object and that will recreate it in the design time database.
jjre
The only way to find that out is to trace the types of changes made. Can you describe what kind of changes you are making after which this occurs Is this happening when you are syncing /merging changes from source control
-GertD
bond12
Gert,
If Jeff Lynch is correct, which I think he is, a trace isn't necessary. It seems that the design database is not updated when a project is loaded and a Get Latest is done. Doesn't this explain how the two can get out of synch
Amos.