I am getting the following error with my database project in VS2012. The problem started when I added a custom type in my Database project in VS2012.
CREATE TYPE [dbo].[DestAttractions] AS TABLE(
[TAAttractionId] [varchar](10) NOT NULL,
[TARatingImgUrl] [varchar](256) NULL,
[TAReviewCount] [int] NULL,
[TAReviewUrl] [varchar](256) NULL)
When I try to reference the type in stored procedure which is also part of the database project
CREATE PROCEDURE [dbo].[spupd_DestinationTripAdvisorData]
@DestinationId INT,
@TAAwardImgUrl VARCHAR(256),
@Attractions dbo.DestAttractions READONLY
AS
BEGIN
------
------
END
And build the database project I keep on getting the following error which is quite annoying since the stored procedure works flawlessly and there is no problem with the type.
SQL71501: Parameter: [dbo].[spupd_DestinationTripAdvisorData].[@Attractions] has an unresolved reference to Built-in Type [dbo].[DestAttractions]. Any pointers or help will be much appreciated.
In my case the solution was to change the Build Action of file what contains the type definition to Build.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With