This function inserts a row into a SQL database and needs to return the identity number created:
Function WriteDatabase(backupTypeID, numImages, folderSize,
I do the same thing (very similar anyway). I believe that there are two sets of results coming back, one for the INSERT and then another for the SELECT. Try calling objRecordSet.NextRecordset().