I have this value:
9F7470D37A5BC44D01C19389578E9372 (is a password) and i want to insert it in a varbinary column.
This is my script, but is not working.
$insert = $db->prepare("INSERT INTO Table (password) values (?)");
$insert->execute(array('9F7470D37A5BC44D01C19389578E9372'));
I m getting this error:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 257 [Microsoft][ODBC SQL Server Driver][SQL Server]Implicit conversion from data type varchar to varbinary is not allowed. Use the CONVERT function to run this query. (SQLExecute[257] at ext\pdo_odbc\odbc_stmt.c:133)'
What i m missing?