I have only ever used MySQL for the DataSourcePool use case. I have SQL
Server on my DEV Machine. I will test this out and post back. I would
think this could be a DRiver File issue or COnnection String issue when
you setup the configuration required.
We have plenty of video and articles on using MySQL with AEM. See: Adobe
Experience Manager Help | Querying MySQL data using an Adobe Experience
Manager 6.4 DataSourcePool This will show you step by step on how to get
this use case implemented. See the video too at the end of this article.
When you say Template - do you mean the component code? Anyhow - if you
want to perform this task in the HTL itself (I would recommend Java and
Sling Models and use HTL as a view), - see: htl-spec/SPECIFICATION.md at
master · adobe/htl-spec · GitHub