Just change the field type in the order details table to be varchar instead of a number field so that it can insert properly.
Or really you don't need to store that ID at all since you insert into the orders database the orderID is really all you need.