I have a connection on a web page to a sql server that isn't always
available. I set the CONNECTIONTIMEOUT property to various times between 3
and 20 seconds. However, it appears that the connection timeout for the
initial timeout is must longer than 3 to 20 seconds (more like 40 - 60
seconds).

Has anybody else played with the CONNECTIONTIMEOUT property and had any
luck???? Everything including the error handling works fine except the wait
is too long when the server is not available.



Running: Win2000 Server SP3 , IIS 5.0 , SQL Server 2000 SP3

Code snippet:

on error resume next
conn.errors.clear
conn.ConnectionTimeout = 3
conn.open ConnectionStringRiverdale
ErrorCount = conn.errors.count

TodaysTons = "n/a"
YesterdaysTons = "n/a"
if ErrorCount = 0 then
sql = "select floor(sum(Weight)/2000) as Tons from Coils where
ProducedTime > '" & date() & "'"
TodaysTons = conn.execute (sql).fields("Tons")
if isnull(TodaysTons) then TodaysTons = 0

sql = "select floor(sum(Weight)/2000) as Tons from Coils where
ProducedTime > '" & date() -1 & "' AND ProducedTime <='" & date() & "'"
YesterdaysTons = conn.execute (sql ).fields("Tons")
if isnull(YesterdaysTons) then TodaysTons = 0

else
for each error in conn.Errors
ErrorString = ErrorString & ";" & error
next

ErrorString ="Error connecting to Riverdale database - error:" &
right(ErrorString,len(ErrorString) -1)
end if


Thanks for the help,
Jim Kennelly