Upon the discharge and dismissal of a person pursuant to § 23A-27-14, a court shall order that all official records, other than the nonpublic records to be retained by the Division of Criminal Investigation, be sealed along with all records relating to the person's arrest, indictment or information, trial, finding of guilt, and dismissal and discharge. The effect of such order is to restore such person, in the contemplation of the law, to the status he occupied before his arrest or indictment or information. No person as to whom such order has been entered shall be held thereafter under any provision of any law to be guilty of perjury or of giving a false statement by reason of his failure to recite or acknowledge such arrest, indictment or information, or trial in response to any inquiry made of him for any purpose.
SDCL 23A-27-17