Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove access login dialog on start up

Status
Not open for further replies.

Wings

Programmer
Feb 14, 2002
247
US
Hi,
I have a program that uses a table component as well as an SQL component to control a microsoft access database. Whenever the program starts, I get a log in dialog for the database, is their any way to get rid of this?

Thanks
 
There is a way to do that. If I remember correct it is a Parameter in the connect method. I'll have to look in some old listings in the evening.

hnd
hasso55@yahoo.com

 
Here is the solution:

In the TDataBase Class there is the Property "LoginPrompt"

Following the description from the C++Builder Help:


Description

Use LoginPrompt to control the login method for remote database connections. If true, (the default), either the standard C++Builder Login dialog box opens when the application attempts to connect to a database, or the OnLogin event is called if one is provided for the application.

The standard Login dialog box prompts for a valid user name and password. If the entries provided by the user are not valid, the connection fails. Applications that provide an OnLogin event must make sure that the event provides these values to the server.

If an application sets LoginPrompt to false, then user name and password values must be supplied as USER NAME and PASSWORD parameters in the Params property.

Note: Storing hard-coded user name and password entries in the Params property or in code for an OnLogin event can compromise server security.
hnd
hasso55@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top