Converted LoadVariables, and LoadVariables_result to QueryDatabase