[Solved] Type ‘StoredProcedures’ already defines a member called ‘AddNumber’ with the same parameter types


I tried adding a namespace in one of the file but while deploying i get an error “Incorrect syntax” The code to deploy them in sql server is:

CREATE PROCEDURE ADD_NUMBER ( @Path nvarchar(400) ) AS EXTERNAL NAME Test.StoredProcedures.test1 go

I’m not sure why you removed this bit from your question. If class StoredProcedures is in the namespace Namespace and in the assembly Test, you can use EXTERNAL NAME Test.[Namespace.StoredProcedures].test1. The full type name needs to be a single identifier as far as SQL is concerned, and since the full type name includes a dot, it needs to be quoted.

Note that this will cause multiple different types to have the same name StoredProcedures. There is no problem with that, but it has the same effect as renaming StoredProcedures to separate classes StoredProcedure1 and StoredProcedure2, and renaming is one thing you wanted to avoid (although I do not see why).

8

solved Type ‘StoredProcedures’ already defines a member called ‘AddNumber’ with the same parameter types