I created a function which I call from an ASP page<BR><BR>"Public Function UpdateRecord(rsRecordSet As Recordset) As String"<BR><BR>wich accepts a disconnected recordset and updates the recordset in a database. It returns a string to indicate to the ASP page if there was an error or not.<BR><BR>If I call the function from my ASP page like below, I get a type mismatch<BR>----------------------------------------------------<BR>Dim strValue<BR>strValue = Class.UpdateRecord(oRecordset1)<BR>----------------------------------------------------<BR><BR>If I call the function from my ASP page like below, everything works OK<BR>----------------------------------------------------<BR>Class.UpdateRecord(oRecordset1)<BR>----------------------------------------------------<BR><BR>Does anybody know what I do wrong ? I really want to return a value if there was an error so I can display my own error page and not just get a standard error message which the user does not understand<BR><BR>Thank you for your help,<BR><BR>Noud de Beijer<BR><BR>