TmyConnection Problem
Posted: Thu 20 Jan 2005 02:01
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
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