Encrytion causes access violation

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
OlliWW
Posts: 25
Joined: Mon 25 Mar 2013 17:03

Encrytion causes access violation

Post by OlliWW » Tue 23 Jul 2019 12:33

Hi,

I'm using Encryption with SDAC.

When updating, i'm using this statement:

Code: Select all

        qry.SQL.Text := 'select FIELD1, FIELD2 from dbo.MyTable;
        qry.Encryption.Fields := 'FIELD1, FIELD2;
        qry.DataTypeMap.AddFieldNameRule ('FIELD1', ftString);
        qry.DataTypeMap.AddFieldNameRule ('FIELD2', ftString);
        qry.Open;
        qry.Edit;
        qry.FieldByName('FIELD1').AsString := myString1;
        qry.FieldByName('FIELD2').AsString := myString2;
        qry.Post;        
(Encriptor end encryption password is set earlier)

The tables fields are varbinary fields.

On some tables i get an acess violation in TData.InternalCompareFieldValue. Since i have no source code i can't debug the cause. Maby somebody has an idea?

Here is the full call stack:

Code: Select all

00961b13 +0ca3 MyApp.exe MemData                   TData.InternalCompareFieldValue
00962126 +0206 MyApp.exe MemData                   TData.CompareFieldValue
00a46c27 +0297 MyApp.exe DASQLGenerator            TDASQLGenerator.FieldModified
00a46d95 +0035 MyApp.exe DASQLGenerator            TDASQLGenerator.FieldModified
00a480de +006e MyApp.exe DASQLGenerator            TDASQLGenerator.GenerateUpdateSQL
01494d5f +008f MyApp.exe MSSQLGenerator            TCustomMSSQLGenerator.GenerateUpdateSQL
00a494c4 +0154 MyApp.exe DASQLGenerator            TDASQLGenerator.GenerateSQLforUpdTable
00a49725 +0115 MyApp.exe DASQLGenerator            TDASQLGenerator.GenerateSQL
00a82412 +0562 MyApp.exe DBAccess                  TDADataSetUpdater.CheckUpdateSQL
00a85d9f +008f MyApp.exe DBAccess                  TDADataSetUpdater.PerformSQL
00a8736d +011d MyApp.exe DBAccess                  TDADataSetUpdater.PerformUpdateDelete
00a87550 +0010 MyApp.exe DBAccess                  TDADataSetUpdater.PerformUpdate
0098afa0 +0040 MyApp.exe MemDS                     TDataSetUpdater.DoPerformUpdate
00983b3b +001b MyApp.exe MemDS                     TMemDataSet.DoPerformUpdate
0095e3b4 +0014 MyApp.exe MemData                   TData.InternalUpdate
01479dec +001c MyApp.exe OLEDBAccess               TOLEDBRecordSet.InternalUpdate
00967f97 +0057 MyApp.exe MemData                   TMemData.UpdateRecord
01340d34 +0004 MyApp.exe SqlClasses                TSqlRecordSet.UpdateRecord
0095e1ae +006e MyApp.exe MemData                   TData.PostRecord
00967c7c +004c MyApp.exe MemData                   TMemData.PostRecord
00982e59 +0169 MyApp.exe MemDS                     TMemDataSet.InternalPost
00a75993 +0123 MyApp.exe DBAccess                  TCustomDADataSet.InternalPost
0091a310 +0040 MyApp.exe Data.DB                   TDataSet.CheckOperation
00919bb2 +0062 MyApp.exe Data.DB                   TDataSet.Post
00982f4c +000c MyApp.exe MemDS                     TMemDataSet.Post
014be8fb +000b MyApp.exe MSAccess                  TCustomMSDataSet.Post
0529205e +2bbe MyApp.exe Objects 1116 +558 TMyObject.prcSave

Stellar
Devart Team
Posts: 496
Joined: Tue 03 Oct 2017 11:00

Re: Encrytion causes access violation

Post by Stellar » Wed 24 Jul 2019 14:50

Thank you for providing the information. We've reproduced the issue and started to investigate possible causes of the described behavior. We will let you know the results as soon as we get them.

OlliWW
Posts: 25
Joined: Mon 25 Mar 2013 17:03

Re: Encrytion causes access violation

Post by OlliWW » Wed 24 Jul 2019 14:55

Hi Stellar,

Thank you for your response. I'll wait for further notice.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Encrytion causes access violation

Post by ViktorV » Thu 25 Jul 2019 13:38

Thank you for the information. We have already fixed the issue.
This fix will be included into the next SDAC build.

OlliWW
Posts: 25
Joined: Mon 25 Mar 2013 17:03

Re: Encrytion causes access violation

Post by OlliWW » Mon 09 Sep 2019 13:37

Hey,
Could you please provide me some informations, when the next version will be released? Because at the moment i can not encrypt fields.
If no new version is expected very soon: is there a workarround?

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Encrytion causes access violation

Post by ViktorV » Mon 09 Sep 2019 14:12

We can send you the nigthly build that include the necessary changes.
Please provide your license number and IDE version to us via the e-support form: https://devart.com/company/contactform.html and we will send you a night build.

Post Reply