During my work as a software engineer I was repeatedly asked to get some information out of a database and create some sort of file out of it or to send it by email. To make this task easier i created a templating mechanism and called it DBPublisher. Over the years that library grew in functionality and flexability. DBPublisher is a library written in Visual Basic 6 and can be access from every programming language that can call an activex dll.
- Easy datasource and source query definition
- Complete free template format. (plain text, html or any other format you can think of)
- section grouping and sub grouping
- Include other templates which could have a different datasource. (sub forms)
- Write the result to one or more files in a folder, FTP it to an other server or send it as an email (bulk email)
The total DBPublisher source code can be downloaded from here.
Below you can see a sample of a simple publishing template. In the downoad above more samples are available (including mail and ftp samples)
DSN = Provider=Microsoft.Jet.OLEDB.4.0;Data Source=NorthWind.mdb;Persist Security Info=False
Recordset = Select * from Demo
PageGrouping = CustomerID
TargetDir = ../samples/
<title>All <%CompanyName%> orders</title>
<tr><td colspan=99>This page was generated on <%Date%> at <%Time%> by '<%App.ProductName%>'
<tr><td colspan=99><%INCLUDE orders.htt;CustomerID=CustomerID%></td></tr>
<tr><td colspan=6><a name="<%OrderID%>"></a>Order : <%OrderID%> date : <%OrderDate%></td>
<td colspan=4>Class variables</td></tr>