Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sql71501 sql parameter has unresolved reference to build-in type Visual Studio 2012 DB project

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.

like image 891
user869375 Avatar asked Dec 25 '22 22:12

user869375


1 Answers

In my case the solution was to change the Build Action of file what contains the type definition to Build.

like image 149
csabee Avatar answered Dec 27 '22 11:12

csabee