Because when I execute this stored procedure, it behaves like this:
Since C # happens like this
declare @p2 char(13)
set @p2='AGB17920'
exec sp_nuevo_codigo @CodGrupo='AGB',@vcodarticul=@p2 output
select @p2
In Visual Fox Pro it goes like this:
declare @p4 varchar(8000)
set @p4=''
exec sp_executesql N'exec sp_nuevo_codigo @P1 @P2 OUTPUT ',N'@P1 varchar(3),@P2 varchar(8000) OUTPUT','AGB',@p4 output
select @p4
In Visual Fox Pro, it's where the error comes from:
Msg 102, Level 15, State 1, Line 23 Incorrect syntax near '@ P2'.