Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL71501: Trigger: [dbo].[TriggerName] has an unresolved reference to object [dbo].[TableName]

I have a SQL Project with some functions and triggers.

In Visual Studio 2010, I could just specify the database connectionstring, and deploy. This worked great.

But now after migrating to Visual Studio 2013, I get a lot errors like this in a generated sql file when I try to build the project:

SQL71501: Trigger: [dbo].[TriggerName] has an unresolved reference 
to object [dbo].[TableName]

How should this be fixed?

like image 557
Erik Dekker Avatar asked Nov 02 '22 03:11

Erik Dekker


1 Answers

Remove database reference before dbo in CREATE TRIGGER sql, then validation will succeed because visual studio will properly reference table in local project.

like image 172
Svisstack Avatar answered Nov 04 '22 07:11

Svisstack