My script allows a user query from a sheet a SQL database. Before letting the script write in the sheet the select's result, how can I know the number of rows I am getting from that query?
Multiplying the count of rows by the count of columns I want to warn the user if the query result size is over 10.000 cells so he is aware of crashing the sheet.
The method getColumnCount() works perfect but not for rows. I tried some other ways but nothing worked... any advice?
var columnsNumber = resultmetadata.getColumnCount();
ui.alert(columnsNumber); //this works
var rowsNumber = resultmetadata.getRowCount();
ui.alert(rowsNumber); //this doesn't work
Thanks, Gerónimo