MdotButler
Programmer
I am trying to set default values on the parameters defined in a procedure. Following is the parameters portion of the 'create procedure' I am trying to set up.
When I run the create procedure script I get a number of errors which I can't seem to get past. Mainly it is the setting of the character type parameters to '' which is the major culprit. Following are the errors.
It has to be something very easy. What am I missing?
TIA
Mark
Code:
CREATE PROCEDURE xxx_Insert
(
@U_UID char = NEWID,
@U_LoginName varchar = '',
@U_PassWord varchar = '',
@U_Enabled bit = 1,
@U_LoginDate datetime = NULL,
@U_LoginCount int = 0,
@U_LoginFailedDate datetime = NULL,
@U_LoginFailedCount int = 0,
@U_UserName varchar = '',
@U_Affiliation varchar = '',
@U_Phone varchar = '',
@U_UserType varchar = '',
@U_PasswordChanged datetime = NULL,
@U_Comments varchar = '',
@U_GUID char = '',
@U_AddDate smalldatetime = GETDATE,
@U_AddUID char = NULL,
@U_ChgDate smalldatetime = GETDATE,
@U_ChgUID char = NULL
)
Code:
Server: Msg 2724, Level 16, State 1, Procedure xxx_Insert, Line 0
Parameter '@U_UID' has an invalid data type.
Server: Msg 2724, Level 16, State 1, Procedure xxx_Insert, Line 0
Parameter '@U_LoginName' has an invalid data type.
Server: Msg 2724, Level 16, State 1, Procedure xxx_Insert, Line 0
Parameter '@U_PassWord' has an invalid data type.
Server: Msg 2724, Level 16, State 1, Procedure xxx_Insert, Line 0
Parameter '@U_UserName' has an invalid data type.
Server: Msg 2724, Level 16, State 1, Procedure xxx_Insert, Line 0
Parameter '@U_Affiliation' has an invalid data type.
Server: Msg 2724, Level 16, State 1, Procedure xxx_Insert, Line 0
Parameter '@U_Phone' has an invalid data type.
Server: Msg 2724, Level 16, State 1, Procedure xxx_Insert, Line 0
Parameter '@U_UserType' has an invalid data type.
Server: Msg 2724, Level 16, State 1, Procedure xxx_Insert, Line 0
Parameter '@U_Comments' has an invalid data type.
Server: Msg 2724, Level 16, State 1, Procedure xxx_Insert, Line 0
Parameter '@U_GUID' has an invalid data type.
Server: Msg 2724, Level 16, State 1, Procedure xxx_Insert, Line 0
Parameter '@U_AddUID' has an invalid data type.
Server: Msg 2724, Level 16, State 1, Procedure xxx_Insert, Line 0
Parameter '@U_ChgUID' has an invalid data type.
Parameter '@U_UID' has an invalid data type.
Parameter '@U_LoginName' has an invalid data type.
Parameter '@U_PassWord' has an invalid data type.
Parameter '@U_UserName' has an invalid data type.
Parameter '@U_Affiliation' has an invalid data type.
Parameter '@U_Phone' has an invalid data type.
Parameter '@U_UserType' has an invalid data type.
Parameter '@U_Comments' has an invalid data type.
Parameter '@U_GUID' has an invalid data type.
Parameter '@U_AddUID' has an invalid data type.
Parameter '@U_ChgUID' has an invalid data type.
TIA
Mark