1

I have a database project where there is a stored-procedure spBarFoo.

Whan I try to deploy the project, even though I refer to a table within the data base I work on I receive warnings like:

Warning xx SQL04151: Procedure: [dbo].[spBarFoo] has an unresolved reference to object [Foo].[dbo].[Bar]. D:...\Schema Objects\Schemas\dbo\Programmability\Stored Procedures\spBarFoo.proc.sql

Warning xx SQL04151: Procedure: [dbo].[spBarFoo] has an unresolved reference to object [Foo].[dbo].[Bar].[Id] D:...\Schema Objects\Schemas\dbo\Programmability\Stored Procedures\spBarFoo.proc.sql

Warning xx SQL04151: Procedure: [dbo].[spBarFoo] has an unresolved reference to object [Foo].[dbo].[Bar].[Name] D:...\Schema Objects\Schemas\dbo\Programmability\Stored Procedures\spBarFoo.proc.sql

Warning xx SQL04151: Procedure: [dbo].[spBarFoo] has an unresolved reference to object [Foo].[dbo].[Bar].[Surname] D:...\Schema Objects\Schemas\dbo\Programmability\Stored Procedures\spBarFoo.proc.sql

Here is the citation from the stored-proc:

CREATE PROCEDURE [spBarFoo] @birthDate datetimeoffset
AS

-- Some stuff

INSERT INTO Foo..[Bar](
           [Id]
          ,[Name]
          ,[Surname]

-- Rest of the sp

Question: How can I make Visual Studio to resolve this reference to the Foo..[Bar] ?

1 Answer 1

2

Try to remove explicit database name from procedure. I.e. instead of INSERT INTO Foo..[Bar]( just use INSERT INTO [Bar](.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.