>Can anyone suggest a simple way of converting a dbf to html
>
>I need to be able to run it as an unattended scheduled service every night
Not to be dense, but you do know how to generate a text string concatenating strings right? Just loop through the table and write out each row as a text string.
USE myTable
TEXT to lcHTML
<table>
<tr>
<th>col1</th><th>col2</th>
</tr>
ENDTEXT
SCAN
lcHtml = lcHtml + "<tr>" + CHR(13) + CHR(10) +;
"<td>" + TRANS(col1) + "</td><td>" + TRANS(col2) + "</td>" + CHR(13) + CHR(10) +;
</tr>" + CHR(13) + CHR(10)
ENDSCAN
lcHtml = lcHtml + "</tr>" + CHR(13) + CHR(10)
STRTOFILE(lcHtml,"c:\temp\htmltable.html")
Obviously you'll need to do a little more work for formatting perhaps or wrap into a template.
If you use West Wind Tools, you can use the HtmlDataGrid class to generate the HTML generically from your table, and use other tools like wwScripting to dynamically create the HTML page and embed the grid (and any other data) into the template.
*
HtmlDataGrid*
wwScripting+++ Rick ---