I am really sorry but I cannot agree with you at all on this point.
I am very happy that you can store your files and that I could have been of help there.
But although most programming languages can look the same, no two really are exactly the same.
In Java a String is a byte array. There is no differance at all. So your sentence means absolutely nothing for me in that regard.
Also, in Java you don't really put the SQL statement in a variable so that point is moot too.
From a logical point of view, what you have done sounds pretty good, open connection once, loop a bunch of times and for each loop execute the query.
But as I said in the beginning of this reply, I cannot agree with you because this is, in my opinion, purely a ColdFusion question and nothing else.