#include "SaRnHtml.h"
void SaPopulateTable(Widget list, XtPointer client_data, SaCallbackStruct *cbs);
<TABLE BORDER>
<CAPTION>Authors</CAPTION>
##Sa_AuthorTableSite##
</TABLE>That is, the call assumes that the Table element is declared in the HTML template. This call will fill in the Table Column headers with the column labels returned by the Data Object, and will produce one table row for each row in
cbs
. Note: It may not make much sense "populating" a table element in a ##Sa_BeginLoop##
and ##Sa_EndLoop##
section, since this will make a table element of one row for each returned row in cbs
.
/*** the following ad-hoc example can be used without
templates **/
SaCallbackStruct *cbs;
cbs = SaExecSQL("CEZANNE", "pubs2", SGESYBASE, "select * from authors");
/***** print html and table headers *****/
SaPopulateTable(NULL, NULL, cbs);
/*** print out end of table and html headers ***/
SaFreeCbs(cbs);