SQL Stored Procedure with VARBINARY Parameter

I have been having a ton of issues trying to run stored procedures with parameters. I created a extremely simple test stored procedure:


(@test VARBINARY(18))


	SELECT @test


And I get this error:

“message”: “Failed to call database stored procedure.\nCDbCommand failed to execute the SQL statement: SQLSTATE[42000]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Implicit conversion from data type char to varbinary is not allowed. Use the CONVERT function to run this query.”

I get this error no matter what value I use as the test parameter including letting it default to NULL. It runs without error in SQL server managment Studio

Any help is appreciated.