F
Franck
hello,
I have a pb with a stored procedure:
simple one:
CREATE PROCEDURE dbo.loginRoles(@Role varChar (60) output,
@UserId varChar (60) )
as
declare @nbreRow int
begin
set @nbreRow = (select count(*)
FROM [Northwind].[dbo].[EmailId]
where [UserId]=@UserId)
if ( @nbreRow>0 )
begin
set @Role = ----------------------
(select [roles ]
FROM [Northwind].[dbo].[EmailId]
where [UserId]=@UserId)
end
else
begin
set @Role ='generic' ----------------------
end
return @Role
end
If I assign the value in this statement: set @Role ='generic'
or if it does enter the condition the same message appear
System.Data.SqlClient.SqlException: Syntax error converting the varchar
value 'admi' to a column of data type int.
any ideas ?
thanks
I have a pb with a stored procedure:
simple one:
CREATE PROCEDURE dbo.loginRoles(@Role varChar (60) output,
@UserId varChar (60) )
as
declare @nbreRow int
begin
set @nbreRow = (select count(*)
FROM [Northwind].[dbo].[EmailId]
where [UserId]=@UserId)
if ( @nbreRow>0 )
begin
set @Role = ----------------------
(select [roles ]
FROM [Northwind].[dbo].[EmailId]
where [UserId]=@UserId)
end
else
begin
set @Role ='generic' ----------------------
end
return @Role
end
If I assign the value in this statement: set @Role ='generic'
or if it does enter the condition the same message appear
System.Data.SqlClient.SqlException: Syntax error converting the varchar
value 'admi' to a column of data type int.
any ideas ?
thanks