do while rsPhoto.state <> adStateClosed do while not (isempty(rsPhoto) or rsPhoto.eof) height = 90 if rsPhoto("thumb_width") <> "" then width = rsPhoto("thumb_width") else width = 90 end if if rsPhoto("thumb_height") > 90 then width = height * rsPhoto("thumb_width") / rsPhoto("thumb_height") end if response.write "" response.write "" response.write ""& vbcrlf count = count + 1 rsPhoto.moveNext loop set rsPhoto = rsPhoto.getNextRecordSet loop