The following function works fine the first time, but on refresh or re-call I get the above error on line 9. <BR><BR>6 function getconnection (filename)<BR>7 dim temp<BR>8 set temp = Server.CreateObject("ADODB.Connection")<BR>9 temp.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath( _<BR>10 filename), "admin", ""<BR>11 set getconnection = temp<BR>12 end function<BR><BR>This is the function that is setting up database connection to be used by another function to open recordeset object.<BR><BR>Thanks<BR>Dipak