UniConnectDialog1 clear edit's

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Senad
Posts: 34
Joined: Tue 10 Dec 2013 08:07

UniConnectDialog1 clear edit's

Post by Senad » Thu 08 Feb 2018 07:31

How can you clear the edit boxes (Username,Password) and a database selection in UniConnectDialog1 after you login ? I use the dialog to log in and out of my application but when I log out the data in the UniConnectDialog1 is still there from the previous login. I would like that cleared.

I tried this :

Code: Select all

DataModule2.UniConnection1.Password := '';
But it somehow hangs my stored procedures ...

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: UniConnectDialog1 clear edit's

Post by azyk » Fri 09 Feb 2018 15:17

To clear the credentials after signing out, call the TUniConnection.Disconnect method, and then clear all the required connection settings. For example:

Code: Select all

DataModule2.UniConnection1.Disconnect;
DataModule2.UniConnection1.Username := '';
DataModule2.UniConnection1.Password := '';
DataModule2.UniConnection1.Database := '';
To avoid storing credentials in the registry for each UniDAC provider, set the TUniConnectDialog.StoreLogInfo property to False. More details about this: https://www.devart.com/unidac/docs/?dev ... oginfo.htm

If your stored procedures hang, please compose a small sample to reproduce the issue and send it to us. In the sample, also include scripts to create stored procedures and the structure of tables that use these stored procedures.

Post Reply