본문으로 바로가기

ASP의 DB Connection Timeout 설정법

category 프로그래밍/ASP 2008. 11. 11. 10:41
반응형

- Connection에 대한 Timeout 설정.
ex)
With dbConn
    .CommandTimeout = 600
    .ConnectionTimeout = 600
    .Open strConnect
End With

- Command 객체에 대한 Timeout 설정.
ex)
With oCmd
    .ActiveConnection = dbConn
    .CommandType = &H0001
    .CommandText = query
    .CommandTimeout = 600
    .Execute
End With

-- 스크립트 timeout 설정법.
Server.ScriptTimeOut = 1000

-- DB timeout 설정법. (초단위)
DB.CommandTimeOut = 300
DB.ConnectionTimeOut = 300

-- DBCP에서 Connection timeout 설정 방법.
- JDBC 에서 설정법.
java.sql.DriveManager.setLoginTimeout(5000);
반응형