ADO components CommandTimeout

后端 未结 3 1602
后悔当初
后悔当初 2021-01-12 13:26

I have a problem with settings of the query execution timeout with TADOQuery, TADOCommand or TADODataSet (I\'ve tried it with each one). I have a tiny application, which con

3条回答
  •  盖世英雄少女心
    2021-01-12 14:13

    I've always used the following code to set the CommandTimeout value on a TADOQuery. If you adjust the class name it should also work with the others as well.

    type 
    TADOQueryHack = class(TADOQuery);
    
    ...
    
    TADOQueryHack(Qry).CommandTimeout := COMM_TIMEOUT;
    

提交回复
热议问题