I'm writing an ORM for my own needs, which is based on SQLDB.
Do you know about the tiOPF framework?
http://tiopf.sourceforeg.netIt has been in use in commercial environments since before 1999, but was open sourced then by an Australian company called TechInsite. It is very well tested with 1600+ unit tests running every 3 hours, 24/7. It automatically shares a single connection between multiple queries, but you have the ability to create your own extra connections and transactions too - but normally isn't necessary. You can also tell tiOPF how many connections to open in the connection pool.
It has tons of other very useful features too. eg: You application can use any of the supported database components (SqlDB, Zeos, IBX, ADO, etc), or even text backends (TAB, CSV, XML). There is even a 3-tier backend with supplied Application Server (and embedded HTTP server). Your application can communicate with multiple database servers, and you can switch between all of these (even 3-tier) without changing a single line of code in your application, just a toggle of a compiler define and a recompile.
You can also find more details (mainly install and setup with Lazarus IDE) here:
http://wiki.freepascal.org/tiOPFIf you want to discuss or ask further question regarding tiOPF and its features, I welcome you to choice the project's support newsgroup. You can connect with any news client (Opera, Thunderbird, XanaNews Outlook Express etc), or use the web interface.
NNTP Server: geldenhuys.co.uk
NNTP Port: 119
Web Interface if you don't use a news client:
http://geldenhuys.co.uk/webnews/