I have a procedure stored in sql, when I run it in the same sql it runs all Ok:
declare @x as varchar(13)
exec sp_nuevo_codigo 'AGB', ''
print @x
go
But when I run it from C #, vb, Fox Throws this error:
-
in the Profiler:
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
-
The error:
Msg 102, Level 15, State 1, Line 23 Sintaxis incorrecta cerca de '@P2'. (1 row(s) affected)