tedious icon indicating copy to clipboard operation
tedious copied to clipboard

insert in encrypted column

Open ali-khabbaz opened this issue 8 years ago • 4 comments

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'_```

ali-khabbaz avatar May 26 '18 15:05 ali-khabbaz

Hi @ali-khabbaz, tedious currently doesn't support always encrypted feature.

Suraiya-Hameed avatar May 28 '18 16:05 Suraiya-Hameed

We have always encrypted in future plan #512 so, I'll go ahead and close this issue.

Suraiya-Hameed avatar May 30 '18 22:05 Suraiya-Hameed

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 avatar May 20 '19 22:05 LereveLabs

@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.

David-Engel avatar May 21 '19 18:05 David-Engel