August 21, 2015 at 1:35 am
In database projects, VS2015, I want to create some views for me database that will reference another database table using 3 part naming reference.
Works fine in SSMS but when I try and build me project I is throwing up a reference error.
I can't import the other database into this project, so is there a way to suppress the error? I don't really want to exclude these view from the project.
Thanks,
August 21, 2015 at 6:32 am
you have to create synonyms for anything that points to objects outside of the database.
the synonym will have deferred resolution,and your project will compile correctly, as you replace each three part reference with a synonym.
Lowell
August 21, 2015 at 6:43 am
Ah good thought.
I thought i I created one to cover it it would try an evaluate that also and kick up an error.
I'll give it a go!
Thanks buddy
August 21, 2015 at 8:19 am
Nope, still getting a unresolved reference to object error when i try the build. Has this worked for you?
August 24, 2015 at 8:28 am
can you change the location of the data that the view is referring to?
Even adding a task to move the data and then apply the amended view to test if this is the issue.
August 24, 2015 at 8:36 am
The view works fine when deployed manually. I think i am going to have to create a dacpac and reference that
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply