I can no longer open my SQL database Table definition in Visual Studio

Donald Symmons 3,066 Reputation points
2023-12-19T07:09:16.2966667+00:00

Hello Community,

I do not know why this error has occurred recently. before now, I used to open Table definition and edit my tables and stored procedure, but in the past 5 days I have been unable to do that. I get this errors each time I try

Is there a way this can be resolved, please?

I tried using SQL server Management Studio to add new tables, trying to add new stored procedures I see red lines in my stored procedure, indicating "Invalid object..........". example

CREATE PROCEDURE [dbo].[CertificateRecipient]
	 @CreatedBy VARCHAR(50)
	,@PageIndex INT
	,@PageSize INT
	,@RecordCount INT OUT

AS
	BEGIN
    SELECT ROW_NUMBER() OVER(ORDER BY Id DESC) RowNumber
	        ,Id
			,email
			,CreatedBy
			,CreatedDate
			,Recipient
			,RecEmail
			,Reference
    INTO #Temp 
    FROM DocumentTable
	WHERE CreatedBy = @CreatedBy ORDER BY Id DESC

	SELECT @RecordCount = COUNT(*) FROM #Temp

	SELECT * FROM #Temp
    WHERE (RowNumber BETWEEN ((@PageIndex-1) * @PageSize) + 1 AND (@PageIndex * @PageSize)) OR @PageIndex = - 1 ORDER BY Id DESC
   
    DROP TABLE #Temp 

	END

Red lines under table name "DocumentTable", and columns

a1

a

a2

Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other
A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
SQL Server | Other
{count} votes

Answer accepted by question author
  1. Cloudoire Academy 23,595 Reputation points Volunteer Moderator
    2023-12-19T16:53:07.23+00:00

    Thanks for posting your question in the Microsoft Q&A forum.
    I found this error when using "Server Explorer" instead of "SQL Server Object Explorer" to add new tables.

    ** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful **


1 additional answer

Sort by: Most helpful
  1. Donald Symmons 3,066 Reputation points
    2024-01-04T05:11:53.6333333+00:00

    I have decided to use SQL Server Management Studio for this and it is working. Thank you everyone for your answers. I really appreciate

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.