Tuesday, February 21, 2012
Visual Studio Database (VSDB) Project issue with UDF and Views
In Visual Studio 2010, there seems to be a dependency problem with User Defined Functions (UDF) and Views. The deployment script created by the VSDB project always puts UDF before database Views. Consider this scenario, we have a database function which depends on a database view and we have altered both the function and the view. Now, when a deployment script is created for this database project, the altered function is always placed before the alter view statement. Running this script will fail at alter function statement because the dependent view was not altered yet. I could not find any settings in VSDB project to change the sequence order for the build, meaning build my database View first and then the UDF. The only workaround I found was to alter my database View in the pre-deployment script.
Labels:
Database,
Visual Studio,
VSDB
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment