Here is my code:
foreach(cargpspoint; cargpspoints) { auto cmd_dist = new PGCommand(pgconnection, sql_query)); try { auto nresult = cmd_dist.executeQuery(); auto nanswer = nresult.array; nresult.close(); if(nanswer.empty) { continue; } } OS: Windows.