Board index » delphi » How to avoid Database Login Prompt using MS-Access Database

How to avoid Database Login Prompt using MS-Access Database

I am trying to avoid the Login Prompt while accesing a Access Database.
I add a Database Control in my main form and assign login params in the
onlogin event
but whenever i open a table in another form the login prompt appears.

What should i do ?

Thank You
Andres Sanchez R.
a...@mail.giga.com

 

Re:How to avoid Database Login Prompt using MS-Access Database


On Fri, 16 Jul 1999 18:20:11 -0600, "Andres Sanchez" <a...@mail.giga.com>
wrote:

Quote
>I am trying to avoid the Login Prompt while accesing a Access Database.
>I add a Database Control in my main form and assign login params in the
>onlogin event
>but whenever i open a table in another form the login prompt appears.

Are you associating the dataset components with the TDatabase? To share the
connection started by the TDatabase, a dataset component (TTable, TQuery,
etc.) must be properly associated with the TDatabase. Do this by assigning
the value in the TDatabase.DatabaseName property to the DatabaseName
property of the dataset component.

  Table1.DatabaseName := Database1.DatabaseName;
  Table1.Open;

==========================================================================
Steve Koterski                  "Computers are useless. They can only give
Technical Publications          you answers."
Borland                                       -- Pablo Picasso (1881-1973)
http://www.borland.com/techpubs/delphi

Other Threads