Where is the function being called? If it is connected to an On… event it is being executed on the client side and if it is a Do… event it is being called on the server side. You can only perform SQL on a server side function due to security restrictions so if it is being called client side it will not do anything.
As an option you could create a new function called newnodeserver which contains the SQL and then call five.executeFunction() within newnode to execute it on the back end.