OK it is referencing the session variable: sumidrive1_OrderID
What is the name of the session variable specified in the Store Cart Summary in database server behavior on the confirm page? Do they match?
Maybe try adding a session_commit() call after the session variable is set when the order is inserted to make sure it is being stored properly.