Not successful yet and not sure how to debug. Previously I would enable debugging and then test the insert in SSMS, but I'm not sure how to do this with the stored procedure.
My procedure (abbreviated) looks like this:
----------------------------------------------------------------------------------
Create PROCEDURE DNNConvert2Bit (@firstName nvarchar(50),@middleName nvarchar(50),@lastName nvarchar(50),@checkbox1 nvarchar(10),@checkbox2
nvarchar(10),@checkbox3 nvarchar(10))
as
begin
declare @checkconvert1 bit
declare @checkconvert2 bit
declare @checkconvert3 bit
if (@checkbox1 = 'Yes') set @checkconvert1 = 1 else set @checkconvert1 = 0
if (@checkbox2 = 'Yes') set @checkconvert2 = 1 else set @checkconvert2 = 0
if (@checkbox3 = 'Yes') set @checkconvert3 = 1 else set @checkconvert3 = 0
INSERT INTO User_tbl(firstName,middleName,lastName,checkbox1,checkbox2,checkbox3)
VALUES (@firstName,@middleName,@lastName,@checkconvert1,@checkconvert2,@checkconvert3)
end
------------------------------------------------------------------------------
My SQL Event looks like this:
DNNConvert2Bit
'$(firstName)',
'$(middleName)',
'$(lastName)',
'$(checkbox1)',
'$(checkbox2)',
'$(checkbox3)'
)
----------------------------------------------------------
The debug response I get in DF shows something like this:
Executing SQL Event
SQL Query: DNNConvert2Bit 'Scott', '', 'Apple', 'Yes', 'Yes', 'Yes' )
--------------------------------------------
I have executed the stored procedure in SSMS, entered some values and received an error that says:
Msg 102, Level 15, State 1, Line 8
Incorrect syntax near '/'.
Any ideas on what I might be doing wrong?