Board index » delphi » Avoid password dialog in paradox table?

Avoid password dialog in paradox table?

Hi,

When opening a password protected paradox table in delphi, is it
possible to avoid getting the password dialog (and use a hard-coded
password as default)?

Delphi5, BDE 5.1
Thanks,
Robert.

 

Re:Avoid password dialog in paradox table?


Use the TSession.AddPassword method to add the password to the password
list.

Ping

Quote
Robert Blok <rb...@xs4all.nl> wrote in message

news:38EA13A7.95795D3A@xs4all.nl...
Quote
> Hi,

> When opening a password protected paradox table in delphi, is it
> possible to avoid getting the password dialog (and use a hard-coded
> password as default)?

> Delphi5, BDE 5.1
> Thanks,
> Robert.

Re:Avoid password dialog in paradox table?


Call

Sesssion.AddPassword('thepassword');

before opening the table.
--
Bill

Bill Todd (TeamB)
(TeamB cannot respond to questions received via email)

Re:Avoid password dialog in paradox table?


On Tue, 04 Apr 2000 17:09:11 +0100, Robert Blok <rb...@xs4all.nl>
wrote:

Quote
>When opening a password protected paradox table in delphi, is it
>possible to avoid getting the password dialog (and use a hard-coded
>password as default)?

Create a handler for the session object's OnPassword event. In this
event handler, use the TSession.AddPassword to specify a String to be
used as a password.

This is described in the Database Developer's Guide part of the online
help, along with source examples. In the help dialog's Contents tab
page:

  Developing Database Applications
    Managing database sessions
      Working with password-protected Paradox tables

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\
Steve Koterski                    "If you aren't fired with
Technical Publications            enthusiasm, you will be
Borland                           fired with enthusiasm."
                              -- Vince Lombardi (1913-1970)

Other Threads