Jump to content

[dcc32 Error] Main.pas(40): E2003 Undeclared identifier: 'syncronize'


MVakili

Recommended Posts

I start a new project , then add a unibitbtn and wrote this lines for test

procedure TMainForm.UniBitBtn1Click(Sender: TObject);
begin
   begin
   try
     showmask('Wait...');
     unisession.syncronize;
     Sleep(1000);

   finally
    hidemask;
    unisession.syncronize();
   end;
end;
end;

But it says 

[dcc32 Error] Main.pas(40): E2003 Undeclared identifier: 'syncronize'

whats wrong ?

should I add any unit ? 
 

Link to comment
Share on other sites

another question 

       ShowMask('Wait ...');
       unisession.Synchronize;
       T1:=Now;
.................... Do Somthing 
       T2:=Now;
       P1.Caption:=IntToStr(SecondsBetween(T1, T2)) 

Always shows 0 

how I can calculate the time of proccess

Link to comment
Share on other sites

1 minute ago, Sherzod said:

Perhaps this is the correct calculated time. What code is being executed?

       ShowMask('Wait ...');
       unisession.Synchronize;
       T1:=Now;
             QR1.Close;
             QR1.SQL.Text:='Select some field from some table ..........................';
             Try
                QR1.OPen;
             Except
                on E:Exception Do
                   Begin
                      ShowMessage('....................');
                      Exit;
                   End;
             End;
             G1.DataSource:=DQR1;
       T2:=Now;
       P1.Caption:=IntToStr(SecondsBetween(T1, T2)) 

 

Link to comment
Share on other sites

15 hours ago, MVakili said:

       ShowMask('Wait ...');
       unisession.Synchronize;
       T1:=Now;
             QR1.Close;
             QR1.SQL.Text:='Select some field from some table ..........................';
             Try
                QR1.OPen;
             Except
                on E:Exception Do
                   Begin
                      ShowMessage('....................');
                      Exit;
                   End;
             End;
             G1.DataSource:=DQR1;
       T2:=Now;
       P1.Caption:=IntToStr(SecondsBetween(T1, T2)) 

 

Found it 

1- its not Sec .. it is ms

2- its not  IntToStr ... its FloatToStr

3- it seems work with Time not Now

So we can use this 

 

Var
  T1 ,T2 : TTime;
Begin
Try
   ShowMask('Wait ...');
   unisession.Synchronize;
   T1:=Time;
           .................... Do Somthing 
   T2:=Time;
   P1.Caption:=FloatToStr(MilliSecondsBetween(T1, T2)) ;
Finally
  HideMask; 
End;

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...