Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 2 of 2 total |
Incorrect Password for Encrypted Table Results in Endless Loop? |
Fri, Aug 10 2007 2:06 PM | Permanent Link |
Steve Caupp | Trying out encrypted DBISAM tables for a proposed project. In the test program I prompt for the
password for the table in the main form's OnShow. I then have this: procedure TForm1.Button1Click(Sender: TObject); begin try tbl.Active := True; except end; end; procedure TForm1.sesPassword(Sender: TObject; var Continue: Boolean); begin if usTablePword <> '' then begin ses.AddPassword(usTablePword); Continue := True; end; end; If the incorrect password is entered this results in an endless loop, with tbl.Active->OnPassword->tbl.Active etc. etc. Is there a "built-in" way to check for a valid password, or do I just need to keep a unit level variable to see if I'm looping and then assume the password is incorrect? Thanks. |
Mon, Aug 13 2007 4:08 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Steve,
<< If the incorrect password is entered this results in an endless loop, with tbl.Active->OnPassword->tbl.Active etc. etc. Is there a "built-in" way to check for a valid password, or do I just need to keep a unit level variable to see if I'm looping and then assume the password is incorrect? >> You'll have to do the latter. DBISAM doesn't do anything more than simply check the password and keep firing the OnPassword event as necessary. However, you might consider changing the architecture a bit so that the AddPassword method is called during the actual prompt of the password to the user. That way you'll simply keep prompting the user if the password is invalid, and then they can select whether or not to continue trying with different passwords. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Friday, March 29, 2024 at 03:30 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |