Changed all executeQuery to executeCommand