I am using PHP, IIS with SQL server 2016 as backend. I am using always encrypted feature. for that I am able to select the data in plain text. but not able to insert the data into the table. I am using the code like this.
$queryInsert = "insert into empinfo (EmpID, JobTitle, LoginID, NatID) values
(?,?,?,?)";
$res = odbc_prepare($connect, $queryInsert);
$result = odbc_execute($res, array($empId, $jobTitle, $loginId, $natId));
I am getting the error like this.
PHP Warning: odbc_prepare(): SQL error: [Microsoft][ODBC Driver 13 for SQL
Server][SQL Server]Operand type clash: void type is incompatible with
nvarchar(256) encrypted with (encryption_type = 'DETERMINISTIC',
encryption_algorithm_name = 'AEAD_AES_256_CBC_HMAC_SHA_256',
column_encryption_key_name = 'CEK_Auto1',
column_encryption_key_database_name = 'Test'), SQL state 22005 in
SQLDescribeParameter in C:\inetpub\wwwroot\odbctest\odbctest.php on line 22
PHP Warning: odbc_execute() expects parameter 1 to be resource, boolean
given in C:\inetpub\wwwroot\odbctest\odbctest.php on line 23
can please anyone tell where am I doing wrong.