In your database, the OrderReferenceID column is set to be numeric, you are storing the session ID in this column which is an alpha numeric string.
Change the OrderReferenceID column to a varchar column in the database.
In the store order summary server behavior, change the data type from number to text for the OrderReferenceID column as well.