Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create a HTML or XML file
Message
From
02/12/2004 04:26:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00966279
Message ID:
00966286
Views:
8
>Hi.
>I have a DBF file, and I need to display it on web site.
>It will have maybe 50 rows and 5 columns, all exist in the dbf file.
>This will need to be uploaded to the web site mabbe once a day.
>I would like to create a file, with Grid Lines and Column Headers, ready for display.
>
>Whats the best and easiest way to do this ?
>
>Regards,
>
>Gerard

Gerard,
A web site might simply format and show it live getting from table (asp, asp.net).
If you want to give as an static HTML simply write your table out with tags (also there is Dbf2HTML class (or prg?) as I remember).
ie:
use customer
set textmerge to memvar m.lcHTML noshow
set textmerge on
\<HTML>
\<BODY>
\<TABLE border="1">
\  <TR><TH colspan="2" align="center">Our Customers</TH></TR>
\  <TR><TH>Company</TH><TH>Contact</TH></TR>
scan
\  <TR><TD><<Company>></TD><TD><<Contact>></TD></TR>
endscan
\</TABLE>
\</BODY>
\</HTML>
set textmerge to
set textmerge off
StrToFile(m.lcHTML,"myCustomers.htm")
For a web site using say ASP.Net doing this from a dbf, xml would be very easy (applying different styles to view, paging etc and changing them on the fly when web site is online).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform