I have created a Table Value Type, which is created fine.
CREATE TYPE [ContactTemplate] AS TABLE (
[Email] VARCHAR(100),
[FirstName] VARCHAR(50),
[LastName] VARCHAR(50)
)
GO
Then, when i try to create a procedure:
CREATE PROCEDURE [dbo].[usp_ProcessContact]
( @Email VARCHAR(100),
@FirstName VARCHAR(50),
@LastName VARCHAR(50),
@Contact ContactTemplate READONLY)
as
Begin
-------
End
I keep getting error at
@Contact ContactTemplate READONLY" The parameter @Contact cannot
be declared READONLY since it is not a table valued parameter
I have tried many things, removing dbo
, brackets etc., still cant get it to work. Help please..