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.
我在VS2012中的数据库项目出现以下错误。当我在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.
SQL71501:参数:[dbo]。[spupd_DestinationTripAdvisorData]。[@ Attractions]有一个未解析的内置类型[dbo]的引用。[DestAttractions]。任何指针或帮助将不胜感激。
1 个解决方案
#1
5
In my case the solution was to change the Build Action of file what contains the type definition to Build.
在我的例子中,解决方案是将包含类型定义的文件的Build Action更改为Build。
#1
5
In my case the solution was to change the Build Action of file what contains the type definition to Build.
在我的例子中,解决方案是将包含类型定义的文件的Build Action更改为Build。