i ve go delphi xe and mydac 7.2.8 and iv got a :Tmyquery : select * from matable where myindex = toto in a table that is not big 2000 or 3000 record but this Tmyquery is really often call by my software and i ve got the error 'Commands out of sync; You can't run this command now'
why
the code
Txat2.Close;
Txat2.ParamByName('session_id').Value:=sessionid;
Txat2.Execute;
if Txat2.RecordCount >0 then .....
Commands out of sync; You can't run this command now
-
[email protected]
- Posts: 12
- Joined: Tue 11 Oct 2005 14:03
Re: Commands out of sync; You can't run this command now
hello,
There are many possible reasons for this error. It is possible if you're executing more than one SELECT query in one dataset.
Please describe in more details the whole case where the error occurs.
There are many possible reasons for this error. It is possible if you're executing more than one SELECT query in one dataset.
Please describe in more details the whole case where the error occurs.
-
[email protected]
- Posts: 12
- Joined: Tue 11 Oct 2005 14:03
Re: Commands out of sync; You can't run this command now
Hello,
i ve got a Twebmodule who is waiting to receive xml file when an xml file arrive it start a procedure that search informations and iv got the problem when 2 simultaneous xml file arrive in the webmodule and launch the procedure who is not finished
i ve got a Twebmodule who is waiting to receive xml file when an xml file arrive it start a procedure that search informations and iv got the problem when 2 simultaneous xml file arrive in the webmodule and launch the procedure who is not finished
-
AndreyZ
Re: Commands out of sync; You can't run this command now
The "Commands out of sync; You can't run this command now" error occurs in this case because you are trying to execute several commands through one connection. To solve the problem, you should create the TMyConnection and TMyQuery components dynamically in your procedure. This way, each call of your procedure will work with its own components and there will be no simultaneous command calls through one connection.