What is the best way to wait for a command to finish before continuing.

From: Avi (rememberoti_at_yahoo.com)
Date: 10/23/03


Date: Thu, 23 Oct 2003 17:22:09 +0200

Hi all,

What is the best way to wait for a command to finish before continuing. I
tried

repeate
Application.ProcessMessages; // or sleep
until not (stExecuting in ADOConnection1.State);

and
repeate
Application.ProcessMessages; // or sleep
until not (stExecuting in ADOCommand.States);