Executing a stored procedure 

Executing a stored procedure 

  
Hi All,

I have cretated a stored procedure in SQL database and I am trying to execute from outsystems and it is throwing errors.I am following below syntax to execute a stored procedure.

EXEC [DBName].[dbo].usp_TestProc @input
Where DBName=DatabaseName  ex:Sample

When I use above syntax,I am getting below error:

Error In Advanced Quey:"usp_TestProc".Database "Sample" does not exist.Make Sure that the name is entered correctly.

EXEC [DB User Id].[dbo].usp_TestProc @input

Where DB User Id=Login Id to connect to database "Sample".Ex:TestLogin

When I use above syntax,I am getting below error:

Error In Advanced Quey:"usp_TestProc".Could not find stored procedure.

Also I have tried another option as shown below,but not working.

EXEC [dbo].usp_TestProc @input .


Thanks,
Prashanth