insert in encrypted column
i try to insert data in encrypted column, here is my code:
let request = new Request(
`INSERT INTO [dbo].[table_name]
([Name])
values ('test')`,
function (err, rowCount, rows) {
if (err) {
console.log('errr--', err);
} else {
console.log(' row(s) ', rows);
}
});
i got this error:
_{ RequestError: Operand type clash: varchar is incompatible with varchar(8000) 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 = 'DrugstoreDB') collation_name = 'SQL_Latin1_General_CP1_CI_AS'_```
Hi @ali-khabbaz, tedious currently doesn't support always encrypted feature.
We have always encrypted in future plan #512 so, I'll go ahead and close this issue.
Hi @Suraiya-Hameed - When do you think this will be added? #512 was created in 2/2017. Is there another option for saving and getting column encrypted data from sql server?
@LereveLabs Always Encrypted (column encryption) is in our backlog but is not currently scheduled for work. There is no time frame for it.
Other supported drivers support Always Encrypted in SQL Server: Microsoft ODBC Driver for SQL Server, Microsoft JDBC Driver for SQL Server, .NET SqlClient, Microsoft Drivers for PHP for SQL Server.
If you require a Node.js solution, there is not one that is currently supported by Microsoft, however, you can look into using node-mssql using the Microsoft ODBC Driver for SQL Server underneath. It may offer some column encryption functionality.