I meant the sessionnumber field. I thought it looks like you changed the ordrnumber field.
ordernumber is used to join in the orders table, and should be set to the same Type as the orderID column (Numeric).
sessionnumber should be set to the sessionid, not the ordernumber. ordernumber should be set to the orderID that was stored in the session by the store cart summary in database server behavior.