corrected sql err code