Skip to content

Ability to reverse engineer stored procedures using temp tables. #539

@nlarion

Description

@nlarion

Perhaps this is a known issue, and in that case apologies... It would be nice to have the ability to reverse engineer stored procedures that create and use temp tables. When I Reverse Engineer a database with stored procedures that include a temp table, the extension throws an error:

The metadata could not be determined because statement 'INSERT #x (something, somethingelse)
SELECT 'wow', GETDATE()' in procedure 'test' uses a temp table.
Unable to scaffold UpdateIncomingSpec

Steps to reproduce

  • Reverse Engineer a database
  • include stored procedures
  • use a stored procedure that includes a temp table.
  • example sproc:

CREATE PROC [dbo].[test]
	@DetailID INT,
	@returnCode INT OUTPUT,
	@result VARCHAR (MAX) OUTPUT
AS

SET NOCOUNT ON

CREATE TABLE #x (
	something VARCHAR (MAX) NOT NULL,
	somethingelse VARCHAR (MAX) NOT NULL
	);

INSERT #x (something, somethingelse)
SELECT 'wow', GETDATE()

BEGIN
	SELECT @ReturnCode = 0, @Result = '';
END

DROP TABLE #x;
GO

Further technical details

EF Core Power Tools version: 2.4.236.0

Database engine: SQL Server

Visual Studio version: VS2019 16.7.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions