Mega Search
23.2 Million


Sign Up

Make a donation  
Delphi XE7 TIBDatabase.SysEncryptPassword [Edit]  
News Group: embarcadero.public.delphi.database.interbase_express

Hello everyone,

I have noticed after upgrading from Delphi XE6 to XE7, that TIBDatabase successfully connects to my encrypted database without setting the SysEncryptPassword property.

At the same time, if I set sys_encrypt_password parameter for TIBDatabase at design time (as I used to do in Delphi XE6), I am getting "DPB Constant () is unknown" error message. Connection is successful when I am not using sys_encrypt_password parameter

Are SysEncryptPassword property and sys_encrypt_password parameter deprecated in Delphi XE7 release of IBX?

Thanks

Vladimir

Edited by: Vladimir Nelenson on Sep 28, 2014 4:03 AM

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 28-Sep-2014, at 4:04 AM EST
From: Vladimir Nelenson
 
Re: Delphi XE7 TIBDatabase.SysEncryptPassword [Edit] [Edit]  
News Group: embarcadero.public.delphi.database.interbase_express
Dan Palley wrote:
> Jeff,
> 
> regarding the invalid DPB parameter, it seems that XE 7 is more sensitive to blank lines in the parameter configuration.  I moved XE 6 code over and got the error until I removed a blank line at design time on the connection component.
> 
> Dan
> 

There were no changes in this area though.  Params are a TStringList and 
GenerateDPB always treated each line as a single parameter pair.  If your params 
are across 2 lines the first parses but has the wrong value for the parameter, 
but it is the next line that has the last part of the value that fails because 
it can't find a key to match it.

While there have been changes in in how I am determining the parameter string to 
parameter integer value from ibashe.h (mainly so I can add new ones without them 
being interface breaking) the actual code that walks the TStringList has not 
changed.  Any changes would have to be in the area of how TMemo handles word 
wrap and putting hte resulting text into it's Lines property.

Now I have not tested a blank line and perhaps in the changes to the lookup of 
string key to integer value I am not skipping blank lines.  There also is not an 
checks to validate that there is a key/value combo on each line other than the 
invalid parameter

Checking on blank lines ... yes I messed up in the conversion to the new lookup 
scheme.  Line 2518 in IBX.IBDatabase.pas should still be

{code{
     if sl.Names[i].Trim.IsEmpty then
       continue;
     ParamName := sl.Names[i].ToLower;
     ParamValue := sl.ValueFromIndex[i];
{code}

The change was actually to support isc_dpb_set_db_readonly, 
isc_dpb_delete_shadow, isc_dpb_sweep and isc_dpb_activate_shadow a few more. 
Since they technically do not have a value I allow those to just be on their own 
without an '=' part. In allowing for that I forgot to skip blank lines 
totally.

>> {quote:title=Jeff Overcash (TeamB) wrote:}{quote}
>> Vladimir Nelenson wrote:
>>> Hi Jeff,
>>> Excuse me for a silly question: where can I find this attachment group with dclib210.bpl?
>>> Thanks
>>> Vladimir
>> embarcadero.public.attachments


-- 
Jeff Overcash (TeamB)
       (Please do not email me directly unless  asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted  corridors of Whitehall.
              (Fish)

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 3-Nov-2014, at 10:27 PM EST
From: Jeff Overcash (TeamB)
 
Re: Delphi XE7 TIBDatabase.SysEncryptPassword [Edit] [Edit]  
News Group: embarcadero.public.delphi.database.interbase_express
Jeff,

regarding the invalid DPB parameter, it seems that XE 7 is more sensitive to blank lines in the parameter configuration.  I moved XE 6 code over and got the error until I removed a blank line at design time on the connection component.

Dan

> {quote:title=Jeff Overcash (TeamB) wrote:}{quote}
> Vladimir Nelenson wrote:
> > Hi Jeff,
> > Excuse me for a silly question: where can I find this attachment group with dclib210.bpl?
> > Thanks
> > Vladimir
> 
> embarcadero.public.attachments

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 3-Nov-2014, at 3:02 PM EST
From: Dan Palley
 
Re: Delphi XE7 TIBDatabase.SysEncryptPassword [Edit] [Edit]  
News Group: embarcadero.public.delphi.database.interbase_express
Vladimir Nelenson wrote:
> Hi Jeff,
> Excuse me for a silly question: where can I find this attachment group with dclib210.bpl?
> Thanks
> Vladimir

embarcadero.public.attachments

-- 
Jeff Overcash (TeamB)
       (Please do not email me directly unless  asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted  corridors of Whitehall.
              (Fish)

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 2-Oct-2014, at 10:07 AM EST
From: Jeff Overcash (TeamB)
 
Re: Delphi XE7 TIBDatabase.SysEncryptPassword [Edit] [Edit]  
News Group: embarcadero.public.delphi.database.interbase_express
Hi Jeff,
Excuse me for a silly question: where can I find this attachment group with dclib210.bpl?
Thanks
Vladimir

> {quote:title=Jeff Overcash (TeamB) wrote:}{quote}
> Vladimir Nelenson wrote:
> > Hi Jeff,
> > 
> > I have lodged QC report 127952
> > 
> > Thanks
> > 
> > Vladimir
> 
> I put an updated dclib210.bpl in the attachments group that fixes this.  XE7 only.
> 
> -- 
> Jeff Overcash (TeamB)
>        (Please do not email me directly unless  asked. Thank You)
> And so I patrol in the valley of the shadow of the tricolor
> I must fear evil. For I am but mortal and mortals can only die.
> Asking questions, pleading answers from the nameless
> faceless watchers that stalk the carpeted  corridors of Whitehall.
>               (Fish)

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 2-Oct-2014, at 3:36 AM EST
From: Vladimir Nelenson
 
Re: Delphi XE7 TIBDatabase.SysEncryptPassword [Edit] [Edit]  
News Group: embarcadero.public.delphi.database.interbase_express
Vladimir Nelenson wrote:
> Hi Jeff,
> 
> I have lodged QC report 127952
> 
> Thanks
> 
> Vladimir

I put an updated dclib210.bpl in the attachments group that fixes this.  XE7 only.

-- 
Jeff Overcash (TeamB)
       (Please do not email me directly unless  asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted  corridors of Whitehall.
              (Fish)

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 29-Sep-2014, at 9:44 PM EST
From: Jeff Overcash (TeamB)
 
Re: Delphi XE7 TIBDatabase.SysEncryptPassword [Edit] [Edit]  
News Group: embarcadero.public.delphi.database.interbase_express
Hi Jeff,

I have lodged QC report 127952

Thanks

Vladimir

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 29-Sep-2014, at 8:59 PM EST
From: Vladimir Nelenson
 
Re: Delphi XE7 TIBDatabase.SysEncryptPassword [Edit] [Edit]  
News Group: embarcadero.public.delphi.database.interbase_express
Vladimir Nelenson wrote:
> Hi Jeff,
> 
> This has helped. Thank you 
> 
> I can now see 2 issues
> 
> 1. Database Component Editor dialog for TIBDatabase.
> Settings memo field in the Database Parameters group automatically wraps its content. Thus when I enter parameter "sys_encrypt_password=my_system_encryption_password", the Settings memo field automatically cuts the line at the memo's width (sys_encrypt_password=my_syste) and transfers the remainder (m_encryption_password) to the next line. This is causing the "DPB Constant () is unknown" error message.
> When SEP is short and fits into one line, it works ok
> I will probably report this issue at QC

Corrected. and sent in. You can still QC it as having a QC makes it easier to 
get it put into a patch for me.

> 
> 2. Over the few weeks of my development process, an instance of my encrypted database has suddenly become accessible without SEP
> The database is still showing itself as Encrypted in IBConsole. It requires correct SEP when I perform backup/restore services on it.
> But TIBDatabase component does not require SEP for successful connection and data retrieve
> Should I open support case with EMBT?
> 

Yes but that should go against InterBase itself.  IBX really just passes what 
you say to the API, if you can bypass the API that would be a pretty major 
security flaw.

> Thanks
> 
> Vladimir


-- 
Jeff Overcash (TeamB)
       (Please do not email me directly unless  asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted  corridors of Whitehall.
              (Fish)

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 29-Sep-2014, at 7:31 PM EST
From: Jeff Overcash (TeamB)
 
Re: Delphi XE7 TIBDatabase.SysEncryptPassword [Edit] [Edit]  
News Group: embarcadero.public.delphi.database.interbase_express
Hi Jeff,

This has helped. Thank you 

I can now see 2 issues

1. Database Component Editor dialog for TIBDatabase.
Settings memo field in the Database Parameters group automatically wraps its content. Thus when I enter parameter "sys_encrypt_password=my_system_encryption_password", the Settings memo field automatically cuts the line at the memo's width (sys_encrypt_password=my_syste) and transfers the remainder (m_encryption_password) to the next line. This is causing the "DPB Constant () is unknown" error message.
When SEP is short and fits into one line, it works ok
I will probably report this issue at QC

2. Over the few weeks of my development process, an instance of my encrypted database has suddenly become accessible without SEP
The database is still showing itself as Encrypted in IBConsole. It requires correct SEP when I perform backup/restore services on it.
But TIBDatabase component does not require SEP for successful connection and data retrieve
Should I open support case with EMBT?

Thanks

Vladimir

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 29-Sep-2014, at 4:04 PM EST
From: Vladimir Nelenson
 
Re: Delphi XE7 TIBDatabase.SysEncryptPassword [Edit]  
News Group: embarcadero.public.delphi.database.interbase_express
Vladimir Nelenson wrote:
> Hello everyone,
> 
> I have noticed after upgrading from Delphi XE6 to XE7, that TIBDatabase successfully connects to my encrypted database without setting the SysEncryptPassword property.
> 

All setting that does is add to the system parameters a key/value for the key 
'sys_encrypt_password' if non empty, removes it from the params if empty string.

> At the same time, if I set sys_encrypt_password parameter for TIBDatabase at design time (as I used to do in Delphi XE6), I am getting "DPB Constant () is unknown" error message. Connection is successful when I am not using sys_encrypt_password parameter
> 
> Are SysEncryptPassword property and sys_encrypt_password parameter deprecated in Delphi XE7 release of IBX?
> 
> Thanks
> 
> Vladimir
> 
> Edited by: Vladimir Nelenson on Sep 28, 2014 4:03 AM

There were no changes at all in that area.  SysEncryptPassword is exactly the 
same in its getter and setter, the GenDPBConstants has the exact same 
association of 'sys_encrypt_password string to the isc_dpb_sys_encrypt_password 
integer constant (which also hasn't changed lines 2790 and 2815 in XE6 and XE7 
respetively) and it has the same slot in how it is built in TIBDatabase.GenerateDPB.

The message you are getting would correspond to putting a param value that is 
wrong (like misspelling it).  If the dictionary association with the string you 
pass is not in the dictionary, it returns a value of -1 which results in that 
error message.

-- 
Jeff Overcash (TeamB)
       (Please do not email me directly unless  asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted  corridors of Whitehall.
              (Fish)

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 28-Sep-2014, at 11:06 PM EST
From: Jeff Overcash (TeamB)