There is another approach you might consider. Use UUIDs for
your primary keys instead of numbers. Then you can do this:
<cfset thiskey = createuuid()>
<cfquery name = "q1">
insert into order
(orderid, etc)
values
(<cfqueryparam value = "#ThisKey#">, etc
<cfquery name = "q1">
insert into order_samples
(orderid, etc)
values
(<cfqueryparam value = "#ThisKey#">, etc