You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a server-side limitation. With column encryption, the sp_describe_* method of getting parameter metadata doesn't work on encrypted columns, but the old method of FMTONLY can't identify IDENTITY columns either.
Regardless, it is always a good idea to specify the column list explicitly in an INSERT.
When connecting with Column Encryption enabled, insertion into any table with an identity column requires explicit specification of the column_list.
Steps to reproduce:
Create a new table with an identity column, like this
CREATE TABLE testDescParam (ID int identity(1,1), Col1 NVARCHAR(100))
Insert a value by binding param
Expected behavior:
Expect the above to succeed. That is, 'BlahBlahBlah' should be inserted into the first row with ID = 1
Actual behavior:
Caught this exception:
SQLSTATE[22018]: [Microsoft][ODBC Driver 17 for SQL Server]Invalid character value for cast specification
To work around this, modify the above INSERT sql to
$sql = "INSERT INTO testDescParam (Col1) VALUES (:value)";
The text was updated successfully, but these errors were encountered: