I have read the SO question about Oracle's Bind equivalent. This is four years later, however. I have looked at sp_executesql from
https://msdn.microsoft.com/en-us/library/ms188001.aspx?f=255&MSPPError=-2147217396
I am not using T-SQL or any sort of Stored Procedure, only a PHP Prepared Statement (using PDO).
How can I view my bound value in SQL Server 2012? If there is a way for me to use sp_executesql, I do not know how to use it.
EDIT: When I say view, I mean a table in SQL Server.
EDIT: I am trying to find out the value that was received by SQL Server. I want to query a view, table, run a stored procedure, something so I can see what SQL Server actually received.
Here is a similar question: What is the SQL Server equivalent of Oracle bind variables in dynamic SQL?
This is what it is in Oracle 11g:
http://docs.oracle.com/cd/B19306_01/server.102/b14237/dynviews_2114.htm#REFRN30310
"V$SQL_BIND_CAPTURE displays information on bind variables used by SQL cursors. Each row in the view contains information for one bind variable defined in a cursor. This includes:"
EDIT: Example,
$sql = "SELECT * FROM employees where employeeid = :mykey";
$prepared_statement = $this->_adapter->prepare($sql);
$prepared_statement->bindValue(':mykey', $_employee_search, PDO::PARAM_INT);
$prepared_statement->execute();
I wan to know :mkey
after it has been sent to SQL Server.