Index: openacs-4/packages/xotcl-core/tcl/context-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/context-procs.tcl,v diff -u -N -r1.58 -r1.59 --- openacs-4/packages/xotcl-core/tcl/context-procs.tcl 28 May 2011 17:15:15 -0000 1.58 +++ openacs-4/packages/xotcl-core/tcl/context-procs.tcl 30 Mar 2012 09:13:23 -0000 1.59 @@ -46,7 +46,9 @@ set ([lindex [split [lindex $v 0] :] 0]) 1 } if {$actual_query eq " "} { - set actual_query [ns_conn query] + if {[ns_conn isconnected]} { + set actual_query [ns_conn query] + } #my log "--CONN ns_conn query = <$actual_query>" }