Hi, i have this problem with mydac 4.40, and now with de 5.10.0.10 delphi7 version. i set user (bad) and password (good) and loginprompt (false) property, but when i connect i trap the error and re connect with login prompt at true, in the connectdialog the user is not the bad user set in the Myconnection.username property. So i change the user (good), error again, cursor go to user label, only click ok and run fine. Its curious. Can i send you this connection test. The goal is to save connect information in tvappstorage of JVCL.
Here the link for example : http://www.system-d.fr/bug/bug_myconnectdialog.zip
This example use JVCL !
MyconnectDialog user not set
Hi,
Yes, without JVCL same process, so i try again and find my logic not good
. I modify and all run fine.
Except that the user show in myconnectdialog is not the user set in myconnection.username ... but not very important.
Thanks.
here sample code :
procedure TDataModule1.DataModuleCreate(Sender: TObject);
begin
// the default property username is test
MyConnection1.username := 'tester'; // Not good
try
MyConnection1.connect;
except
try
showmessage (MyConnection1.username); // tester not good but ok
Showmessage (MyConnectDialog1.Connection.Username); // tester not good but ok
MyConnection1.LoginPrompt := True;
MyConnection1.connect; // show user test ?
except
showmessage ('Error');
end;
end;
end;
Yes, without JVCL same process, so i try again and find my logic not good
Except that the user show in myconnectdialog is not the user set in myconnection.username ... but not very important.
Thanks.
here sample code :
procedure TDataModule1.DataModuleCreate(Sender: TObject);
begin
// the default property username is test
MyConnection1.username := 'tester'; // Not good
try
MyConnection1.connect;
except
try
showmessage (MyConnection1.username); // tester not good but ok
Showmessage (MyConnectDialog1.Connection.Username); // tester not good but ok
MyConnection1.LoginPrompt := True;
MyConnection1.connect; // show user test ?
except
showmessage ('Error');
end;
end;
end;
With JVCL same result : The user show is not the username.property.
Else, thanks for your reply and very goods products.
Here the sample :
unit connect_udm;
interface
uses
SysUtils, Classes, JvComponentBase, JvFormPlacement, DBAccess, MyDacVcl,
DB, MyAccess, JvAppStorage, JvAppIniStorage, JvCipher;
type
TDataModule1 = class(TDataModule)
MyConnection1: TMyConnection;
MyConnectDialog1: TMyConnectDialog;
JvFormStorage1: TJvFormStorage;
Cipher: TJvVigenereCipher;
procedure DataModuleCreate(Sender: TObject);
procedure MyConnection1AfterConnect(Sender: TObject);
procedure JvFormStorage1SavePlacement(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
DataModule1: TDataModule1;
implementation
{$R *.dfm}
uses connect_u1,dialogs;
procedure TDataModule1.DataModuleCreate(Sender: TObject);
begin
JvFormStorage1.RestoreFormPlacement;
try
MyConnection1.connect;
except
try
showmessage (MyConnection1.username);
Showmessage (MyConnectDialog1.Connection.Username);
MyConnection1.LoginPrompt := True;
MyConnection1.connect;
except
showmessage ('Error');
end;
end;
end;
procedure TDataModule1.MyConnection1AfterConnect(Sender: TObject);
begin
JvFormStorage1.SaveFormPlacement;
end;
// for a password crypted - its better ...
procedure TDataModule1.JvFormStorage1SavePlacement(Sender: TObject);
begin
Cipher.Decoded := Myconnection1.Password;
TJvFormStorage(sender).AppStorage.WriteString(TJvFormStorage(sender).AppStoragePath + 'Cipher', Cipher.Encoded);
end;
end.
Else, thanks for your reply and very goods products.
Here the sample :
unit connect_udm;
interface
uses
SysUtils, Classes, JvComponentBase, JvFormPlacement, DBAccess, MyDacVcl,
DB, MyAccess, JvAppStorage, JvAppIniStorage, JvCipher;
type
TDataModule1 = class(TDataModule)
MyConnection1: TMyConnection;
MyConnectDialog1: TMyConnectDialog;
JvFormStorage1: TJvFormStorage;
Cipher: TJvVigenereCipher;
procedure DataModuleCreate(Sender: TObject);
procedure MyConnection1AfterConnect(Sender: TObject);
procedure JvFormStorage1SavePlacement(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
DataModule1: TDataModule1;
implementation
{$R *.dfm}
uses connect_u1,dialogs;
procedure TDataModule1.DataModuleCreate(Sender: TObject);
begin
JvFormStorage1.RestoreFormPlacement;
try
MyConnection1.connect;
except
try
showmessage (MyConnection1.username);
Showmessage (MyConnectDialog1.Connection.Username);
MyConnection1.LoginPrompt := True;
MyConnection1.connect;
except
showmessage ('Error');
end;
end;
end;
procedure TDataModule1.MyConnection1AfterConnect(Sender: TObject);
begin
JvFormStorage1.SaveFormPlacement;
end;
// for a password crypted - its better ...
procedure TDataModule1.JvFormStorage1SavePlacement(Sender: TObject);
begin
Cipher.Decoded := Myconnection1.Password;
TJvFormStorage(sender).AppStorage.WriteString(TJvFormStorage(sender).AppStoragePath + 'Cipher', Cipher.Encoded);
end;
end.