ລະບົບ ADO CommandTimeout
ການກໍານົດແລະການນໍາໃຊ້
ລະບົບ CommandTimeout ສາມາດຕັ້ງຕັດຫຼືກັບຄືນເວລາທີ່ຕ້ອງລໍຖ້າກ່ອນການຢຸດການກະທຳຫຼືການສ້າງຄວາມຜິດພາບ.
ການຕັ້ງຕັດຫຼືກັບຄືນຂໍ້ມູນ Long ທີ່ສະແດງເວລາທີ່ລໍຖ້າສຳລັບການດຳເນີນຄຳສັ່ງພາຍໃນວິນາທີ. ຄູ່ມູນຄົງທົບແມ່ນ 30.
ສັບສຳນັກງານ
object.CommandTimeout
ຄວາມຄິດຈາກ
ເພື່ອອົງການ Command:
<% set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open "c:/webdata/northwind.mdb" set comm=Server.CreateObject("ADODB.Command") comm.CommandTimeout=10 response.write(comm.CommandTimeout) conn.close %>
ເພື່ອອົງການ Connection:
<% set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open "c:/webdata/northwind.mdb" conn.CommandTimeout=10 response.write(conn.CommandTimeout) conn.close %>