in reply to sqlconnection question
This depends on your code.
Show us a simplified example of what you are doing.
If you use one of the combined functions of DBI, like fetchall_arrayref, the data will persist.
On the other hand, if you loop over the results using prepare, execute, fetch, you cannot close the connection, as this will drop your statement handle.
In Section
Seekers of Perl Wisdom