I belive you are looking for the node tags to use in your insert statement. Node Tags will get replaced with the values they point to.
{m:/} will put in the entire message. If the message is your HL7 then it will be put into your insert statement.
Example:
var queryResult = qie.doQuery(
"DatabaseName from Database Connections page",
"INSERT INTO table_name\n" +
"VALUES ({m:/})",
false);