Where are your variables declared? Perhaps it is falling out of scope in the function, and it's automatically being closed? Try declaring the variable outside the functions: dim objDBConn Hope this helps... Ryan Finley President - SurveyMonkey.com -----Original Message----- From: Andrew Martin [mailto:comitque at hotmail.com] Sent: Friday, March 09, 2001 4:48 PM To: thelist at lists.evolt.org Subject: [thelist] close connection I keep getting an error when I try to modify a record in my database. The update, delete, or add all work; the changes get made, however, I still get this error: " ADODB.Recordset error '800a0e78' The operation requested by the application is not allowed if the object is closed. /preload.asp, line 47 " And here are the functions: Function openConnection () Set objDBConn = Server.CreateObject("ADODB.Connection") strConn = "[connection string]" objDBConn.Open strConn Set rsShow = Server.CreateObject("ADODB.Recordset") rsShow.ActiveConnection = objDBConn End Function Function closeConnection () rsShow.close Set rsShow = Nothing objDBConn.Close Set objDBConn = Nothing End Function --------------------------------------- For unsubscribe and other options, including the Tip Harvester and archive of TheList go to: http://lists.evolt.org Workers of the Web, evolt !