how to bind stored procedure to yii2

this is my stored procedure plz any one help me to slove using mysql/mssql

ALTER PROCEDURE [dbo].[Emp]

-- Add the parameters for the stored procedure here

@empcode varchar(250)

AS

BEGIN

-- SET NOCOUNT ON added to prevent extra result sets from


-- interfering with SELECT statements.


declare @qry varchar(50);





--set @emp_id=1; 


SET NOCOUNT ON;





-- Insert statements for procedure here


set @qry=(


SELECT empcode from acerp_employee_details 


where empcode=@empcode);


return @qry


--execute Emp

END

this is my search part

$empcode='AI000064';


    $query = Yii::$app->db->createCommand("CALL Emp(:empcode)") 


                ->bindValue(':empcode' , $empcode)

SQLSTATE[42000]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Incorrect syntax near ‘@P1’.

The SQL being executed was: CALL Emp(‘AI000064’)

I am getting this error

Two things to try:

  1. Change the single quotes ( ’ ) on the value to double quotes ( " ).

or

  1. There is a third param to bindValue() called dataType. There are predefined const for this, I believe you would need PDO::string, or something like that.