search for: win32oleexception

Displaying 1 result from an estimated 1 matches for "win32oleexception".

2006 Apr 05
0
MS-SQL Server dropping connections
...the sqlserver adaptor there is code like @connection.execute(sql) Im proposing that I wrap this in anthoer method, and use something like this ( untested so far): def execute_with_rescue( sql ) reconnect_attempts = 0 retry_count=0 begin @connection.eexecute(sql) rescue Win32OLEException => e # or whatever the class is # send an email so I know its still happening if /Connection failure/.match( e.to_s ) retry_count+=1 retry if retry_count < 2 end # if its still failing, drop the connection and reconnect if @c...