Do you have any connection pooling capability?
The idea being that opening a database connection is expensive compared to a single query. Hence if you can keep the connection open it may pay off. So each "form" or other piece of code goes
pool give me a connection
work with connection
pool I am done with that connection now
and the pool is repsonsible for actually open and closing (and all otehr housekeeping)
Some environments have database drivers which hide all this pooling, the app thinks its just opening and closing connections, but under the covers the pool is working. Always prefer to use such facilities if they exist. Writing your own connection pooling is more work than it appears - a lot more work!