I fixed it now. You right I hadnt passed anything to CDIDString. I've also changed the SQL statement from insert to update.