Hi,
I'm using Delphi 5, MyDac 3.30.2.15.
I attempt to assign myconnection.connect to true at runtime, it appear the lost connection error.
Screen.Cursor := crHourGlass;
Try
MyConnection1.Connected := False;
MyConnection1.Server := TPCIP.FieldByName('IPAddress').AsString;
MyConnection1.Connected := True;
MessageDlg('Succesfully connected to IP : '
+ TPCIP.FieldByName('IPAddress').AsString
, mtInformation, [mbOK], 0);
Except
MessageDlg('Failed to connect to IP : '
+ TPCIP.FieldByName('IPAddress').AsString
, mtError, [mbOK], 0);
End;
Screen.Cursor := crDefault;
but when I used following code then work ok
Screen.Cursor := crHourGlass;
Try
MyConnection1.Connected := False;
MyConnection1.Server := TPCIP.FieldByName('IPAddress').AsString;
//MyConnection1.Connected := True;
QCheckConnect.Close;
QCheckConnect.Open;
MessageDlg('Succesfully connected to IP : '
+ TPCIP.FieldByName('IPAddress').AsString
, mtInformation, [mbOK], 0);
Except
MessageDlg('Failed to connect to IP : '
+ TPCIP.FieldByName('IPAddress').AsString
, mtError, [mbOK], 0);
End;
Screen.Cursor := crDefault;
This happend when the network is 100mbs but the client station is longer than that. (ps: design time the myconnection assign to true is work)
Thanks
TmyConnection Problem
Re: TmyConnection Problem
Does the behaviour change if to add a row
QCheckConnect.Server := MyConnection1.Server;
at the second case?
What value is set to ConnectionTimeout?
QCheckConnect.Server := MyConnection1.Server;
at the second case?
What value is set to ConnectionTimeout?
Hi,
This is the code for testing.
The network connection is 100mps while the distance of PC1 & PC2 is more than 100mps.
This is the code for testing.
The network connection is 100mps while the distance of PC1 & PC2 is more than 100mps.
ThanksScreen.Cursor := crHourGlass;
Try
MyConnection1.Connected := False;
MyConnection1.Server := TPCIP.FieldByName('IPAddress').AsString;
MyConnection1.Connected := True;
MessageDlg('Succesfully connected to IP : '
+ TPCIP.FieldByName('IPAddress').AsString
, mtInformation, [mbOK], 0);
Except
MessageDlg('Failed to connect to IP : '
+ TPCIP.FieldByName('IPAddress').AsString
, mtError, [mbOK], 0);
End;
Screen.Cursor := crDefault;