Run this query and popup to save

How I can use this query to download on the user computer.
this works in PgAdmin

Copy (Select numsocio, concat(apellidos,’ ‘,dueno) As nombre, concat(direccionpostal,’ ‘,ciudad,’ ‘,estado,’ ',codigopostal) As dir1 ,celularnumero,email,statussocio From socios Where statussocio=‘1’) TO ‘/Users/Shared/Socios_List.csv’ DELIMITER ‘,’ CSV HEADER;

in short:

Dim f As FolderItem = GetFolderItem("/Users/Shared/Socios_List.csv", FolderItem.PathTypeShell) If f <> Nil And f.Exists Then App.MyFile = WebFile.Open(f) // "MyFile As WebFile" is a property on the App object App.MyFile.ForceDownload = True If TextFile.Download Then // This causes the file to be downloaded // Download requested End If End If

thanks