I am trying to understand this code...

H

Henry Stock

This is the automatically generated code from the FrontPage Sample Interface. I am trying to understand this so I can figure out where I can add
business logic, etc. to an interface. I gather that the lines in gray are generated by FrontPage.

Can this part be edited manually?

It looks like the area that specifies much of the the information about the query, the tabes used and the columns that will be shown.

What does 202 stand for?

Is i-groupsize the number of records to show per page?

What are the include files shown here?
<!--#include file="../../_fpclass/fpdblib.inc"-->

<!--#include file="../../_fpclass/fpdbrgn1.inc"-->

What are the checksums all about? For example: i-checksum="35618"

This doesn't look like stuff I was expecting to see, ADO recordsets etc.



<!--webbot bot="DatabaseRegionStart"
s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax"
s-columntypes="202,202,202,202,202,202,202,202,202,202,202"
s-dataconnection="Sample" b-tableformat="TRUE" b-menuformat="FALSE"
s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE"
b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
i-listformat="0" b-makeform="TRUE" s-recordsource="Customers"
s-displaycolumns="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax"
s-criteria s-order s-sql="SELECT * FROM Customers" b-procedure="FALSE"
clientside suggestedext="asp" s-defaultfields
s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="5"
botid="0" u-dblib="../../_fpclass/fpdblib.inc"
u-dbrgn1="../../_fpclass/fpdbrgn1.inc"
u-dbrgn2="../../_fpclass/fpdbrgn2.inc" tag="TBODY" startspan
preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot; width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is the start of a Database Results region. The page must be fetched from a web server with a web browser to display correctly; the current web is stored on your local disk or network.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" --><!--#include file="../../_fpclass/fpdblib.inc"-->

<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM Customers"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=11 align=""LEFT"" width=""100%"">No records returned.</td></tr>"
fp_sDataConn="Sample"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=5
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&CustomerID=202&CompanyName=202&ContactName=202&ContactTitle=202&Address=202&City=202&Region=202&PostalCode=202&Country=202&Phone=202&Fax=202&"
fp_iDisplayCols=11
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-checksum="35618" -->

<tr>

<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="CustomerID" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;CustomerID&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"CustomerID")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="23468" -->
</td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="CompanyName" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;CompanyName&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"CompanyName")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="29451" -->
</td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="ContactName" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;ContactName&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"ContactName")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="29292" -->
</td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="ContactTitle" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;ContactTitle&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"ContactTitle")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="32621" -->
</td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="Address" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Address&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Address")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="12103" -->
</td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="City" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;City&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"City")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="4267" -->
</td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="Region" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Region&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Region")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="15114" -->
</td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="PostalCode" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;PostalCode&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"PostalCode")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="28780" -->
</td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="Country" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Country&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Country")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="13796" -->
</td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="Phone" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Phone&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Phone")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="8388" -->
</td>
<td>
<!--webbot bot="DatabaseResultColumn" s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="Fax" b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormat preview="&lt;font size=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Fax&lt;font size=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;" startspan --><%=FP_FieldVal(fp_rs,"Fax")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="1677" -->
</td>


</tr>
<!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE" b-menuformat="FALSE"
u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="5" clientside
tag="TBODY" startspan
preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot; width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is the end of a Database Results region.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;TR&gt;&lt;TD VALIGN=MIDDLE COLSPAN=64&gt;&lt;NOBR&gt;&lt;INPUT TYPE=Button VALUE=&quot; |&lt; &quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot; &lt; &quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot; &gt; &quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot; &gt;| &quot;&gt; [1/5]&lt;/NOBR&gt;&lt;BR&gt;&lt;/td&gt;&lt;/tr&gt;" --><!--#include file="../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-checksum="65064" -->
</tbody>
 
K

Kathleen Anderson

Inline.

--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
Expression Web Resources: http://www.spiderwebwoman.com/xweb/
FrontPage Resources: http://www.spiderwebwoman.com/resources/
Please reply to the newsgroup for the benefit of others


This is the automatically generated code from the FrontPage Sample
Interface. I am trying to understand this so I can figure out where I can
add
business logic, etc. to an interface. I gather that the lines in gray are
generated by FrontPage.

Can this part be edited manually?

KA: Yes. When you save the changes to the gray code, the chnages are
replicated to the maroon colored color (which you should never tough, BTW).

It looks like the area that specifies much of the the information about the
query, the tabes used and the columns that will be shown.

What does 202 stand for?

KA: It defines the field type - don't recall exactly what a 202 is, but
there is a list somewhere.

Is i-groupsize the number of records to show per page?

KA: Yes.

What are the include files shown here?
<!--#include file="../../_fpclass/fpdblib.inc"-->

<!--#include file="../../_fpclass/fpdbrgn1.inc"-->

KA: These files contain the Active Server Page scripts used to implement the
server-side functionality for database features. fpdblib.inc contains the
library functions used by the database features. fpdbrgn1.inc contains the
ASP code that establishes the database connection, and constructs and
executes the query, starting a loop through all database records.
fpdbrgn2.inc contains the ASP code that finishes the query loop started by
fpdbrgn1.inc and closes the database connection.

What are the checksums all about? For example: i-checksum="35618"

KA: Not sure.

This doesn't look like stuff I was expecting to see, ADO recordsets etc.



<!--webbot bot="DatabaseRegionStart"
s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-columntypes="202,202,202,202,202,202,202,202,202,202,202" s-dataconnection="Sample" b-tableformat="TRUE" b-menuformat="FALSE" s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE" i-listformat="0" b-makeform="TRUE" s-recordsource="Customers" s-displaycolumns="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-criteria s-order s-sql="SELECT * FROM Customers" b-procedure="FALSE" clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records returned." i-maxrecords="256" i-groupsize="5" botid="0" u-dblib="../../_fpclass/fpdblib.inc" u-dbrgn1="../../_fpclass/fpdbrgn1.inc" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" tag="TBODY" startspan preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot;width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is thestart of a Database Results region. The page must be fetched from a webserver with a web browser to display correctly; the current web is stored onyour local disk ornetwork.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" --><!--#includefile="../../_fpclass/fpdblib.inc"--><% if 0 then %><SCRIPT Language="JavaScript">document.write("<div style='background: yellow; color: black;'>The DatabaseResults component on this page is unable to display database content. Thepage must have a filename ending in '.asp', and the web must be hosted on aserver that supports Active Server Pages.</div>");</SCRIPT><% end if %><%fp_sQry="SELECT * FROM Customers"fp_sDefault=""fp_sNoRecords="<tr><td colspan=11 align=""LEFT"" width=""100%"">No recordsreturned.</td></tr>"fp_sDataConn="Sample"fp_iMaxRecords=256fp_iCommandType=1fp_iPageSize=5fp_fTableFormat=Truefp_fMenuFormat=Falsefp_sMenuChoice=""fp_sMenuValue=""fp_sColTypes="&CustomerID=202&CompanyName=202&ContactName=202&ContactTitle=202&Address=202&City=202&Region=202&PostalCode=202&Country=202&Phone=202&Fax=202&"fp_iDisplayCols=11fp_fCustomQuery=FalseBOTID=0fp_iRegion=BOTID%><!--#include file="../../_fpclass/fpdbrgn1.inc"--><!--webbot bot="DatabaseRegionStart" endspan i-checksum="35618" --> <tr> <td> <!--webbot bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="CustomerID"b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientsideb-MenuFormat preview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;CustomerID&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan --><%=FP_FieldVal(fp_rs,"CustomerID")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="23468" --> </td> <td> <!--webbot bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="CompanyName"b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientsideb-MenuFormat preview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;CompanyName&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan --><%=FP_FieldVal(fp_rs,"CompanyName")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="29451" --> </td> <td> <!--webbot bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="ContactName"b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientsideb-MenuFormat preview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;ContactName&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan --><%=FP_FieldVal(fp_rs,"ContactName")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="29292" --> </td> <td> <!--webbot bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="ContactTitle"b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientsideb-MenuFormat preview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;ContactTitle&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan --><%=FP_FieldVal(fp_rs,"ContactTitle")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="32621" --> </td> <td> <!--webbot bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="Address" b-tableformat="TRUE"b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormatpreview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Address&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan --><%=FP_FieldVal(fp_rs,"Address")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="12103" --> </td> <td> <!--webbot bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="City" b-tableformat="TRUE"b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormatpreview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;City&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan --><%=FP_FieldVal(fp_rs,"City")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="4267" --> </td> <td> <!--webbot bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="Region" b-tableformat="TRUE"b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormatpreview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Region&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan --><%=FP_FieldVal(fp_rs,"Region")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="15114" --> </td> <td> <!--webbot bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="PostalCode"b-tableformat="TRUE" b-hashtml="FALSE" b-makelink="FALSE" clientsideb-MenuFormat preview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;PostalCode&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan --><%=FP_FieldVal(fp_rs,"PostalCode")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="28780" --> </td> <td> <!--webbot bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="Country" b-tableformat="TRUE"b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormatpreview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Country&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan --><%=FP_FieldVal(fp_rs,"Country")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="13796" --> </td> <td> <!--webbot bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="Phone" b-tableformat="TRUE"b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormatpreview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Phone&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan --><%=FP_FieldVal(fp_rs,"Phone")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="8388" --> </td> <td> <!--webbot bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax" s-column="Fax" b-tableformat="TRUE"b-hashtml="FALSE" b-makelink="FALSE" clientside b-MenuFormatpreview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Fax&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan --><%=FP_FieldVal(fp_rs,"Fax")%><!--webbot bot="DatabaseResultColumn" endspan i-checksum="1677" --> </td> </tr> <!--webbot bot="DatabaseRegionEnd" b-tableformat="TRUE"b-menuformat="FALSE" u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="5" clientside tag="TBODY" startspan preview="&lt;tr&gt;&lt;td colspan=64 bgcolor=&quot;#FFFF00&quot;width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt;This is theend of a Database Resultsregion.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;TR&gt;&lt;TD VALIGN=MIDDLECOLSPAN=64&gt;&lt;NOBR&gt;&lt;INPUT TYPE=Button VALUE=&quot; |&lt;&quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot; &lt; &quot;&gt;&lt;INPUTTYPE=Button VALUE=&quot; &gt; &quot;&gt;&lt;INPUT TYPE=ButtonVALUE=&quot; &gt;| &quot;&gt;[1/5]&lt;/NOBR&gt;&lt;BR&gt;&lt;/td&gt;&lt;/tr&gt;" --><!--#includefile="../../_fpclass/fpdbrgn2.inc"--><!--webbot bot="DatabaseRegionEnd" endspan i-checksum="65064" --> </tbody>
 
H

Henry Stock

Well, if I should not manipulate the code in gray, i.e. the code generated
by the webbot, how do I control what fields are displayed and where to I
stick any business logic that may come in to the equation.?

Let's say I have an insert data form and that insertion will control
insertions to multiple tables. Where do I call that code? In response to
the submit button before posting or a part a post form?


Kathleen Anderson said:
Inline.

--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
Expression Web Resources: http://www.spiderwebwoman.com/xweb/
FrontPage Resources: http://www.spiderwebwoman.com/resources/
Please reply to the newsgroup for the benefit of others


This is the automatically generated code from the FrontPage Sample
Interface. I am trying to understand this so I can figure out where I can
add
business logic, etc. to an interface. I gather that the lines in gray
are generated by FrontPage.

Can this part be edited manually?

KA: Yes. When you save the changes to the gray code, the chnages are
replicated to the maroon colored color (which you should never tough,
BTW).

It looks like the area that specifies much of the the information about
the query, the tabes used and the columns that will be shown.

What does 202 stand for?

KA: It defines the field type - don't recall exactly what a 202 is, but
there is a list somewhere.

Is i-groupsize the number of records to show per page?

KA: Yes.

What are the include files shown here?
<!--#include file="../../_fpclass/fpdblib.inc"-->

<!--#include file="../../_fpclass/fpdbrgn1.inc"-->

KA: These files contain the Active Server Page scripts used to implement
the server-side functionality for database features. fpdblib.inc contains
the library functions used by the database features. fpdbrgn1.inc contains
the ASP code that establishes the database connection, and constructs and
executes the query, starting a loop through all database records.
fpdbrgn2.inc contains the ASP code that finishes the query loop started by
fpdbrgn1.inc and closes the database connection.

What are the checksums all about? For example: i-checksum="35618"

KA: Not sure.

This doesn't look like stuff I was expecting to see, ADO recordsets etc.



<!--webbot bot="DatabaseRegionStart"
s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax"
s-columntypes="202,202,202,202,202,202,202,202,202,202,202"
s-dataconnection="Sample" b-tableformat="TRUE" b-menuformat="FALSE"
s-menuchoice s-menuvalue b-tableborder="TRUE" b-tableexpand="TRUE"
b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="TRUE"
i-listformat="0" b-makeform="TRUE" s-recordsource="Customers"
s-displaycolumns="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax"
s-criteria s-order s-sql="SELECT * FROM Customers" b-procedure="FALSE"
clientside suggestedext="asp" s-defaultfields s-norecordsfound="No records
returned." i-maxrecords="256" i-groupsize="5" botid="0"
u-dblib="../../_fpclass/fpdblib.inc"
u-dbrgn1="../../_fpclass/fpdbrgn1.inc"
u-dbrgn2="../../_fpclass/fpdbrgn2.inc" tag="TBODY" startspan
preview="&lt;tr&gt;&lt;td colspan=64
bgcolor=&quot;#FFFF00&quot;width=&quot;100%&quot;&gt;&lt;font
color=&quot;#000000&quot;&gt;This is thestart of a Database Results
region. The page must be fetched from a webserver with a web browser to
display correctly; the current web is stored onyour local disk
ornetwork.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;" --><!--#includefile="../../_fpclass/fpdblib.inc"--><%
if 0 then %><SCRIPT Language="JavaScript">document.write("<div
style='background: yellow; color: black;'>The DatabaseResults component on
this page is unable to display database content. Thepage must have a
filename ending in '.asp', and the web must be hosted on aserver that
supports Active Server Pages.</div>");</SCRIPT><% end if
%><%fp_sQry="SELECT * FROM Customers"fp_sDefault=""fp_sNoRecords="<tr><td
colspan=11 align=""LEFT"" width=""100%"">No
recordsreturned.</td></tr>"fp_sDataConn="Sample"fp_iMaxRecords=256fp_iCommandType=1fp_iPageSize=5fp_fTableFormat=Truefp_fMenuFormat=Falsefp_sMenuChoice=""fp_sMenuValue=""fp_sColTypes="&CustomerID=202&CompanyName=202&ContactName=202&ContactTitle=202&Address=202&City=202&Region=202&PostalCode=202&Country=202&Phone=202&Fax=202&"fp_iDisplayCols=11fp_fCustomQuery=FalseBOTID=0fp_iRegion=BOTID%><!--#include
file="../../_fpclass/fpdbrgn1.inc"--><!--webbot bot="DatabaseRegionStart"
endspan i-checksum="35618" --> <tr> <td> <!--webbot
bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax"
s-column="CustomerID"b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientsideb-MenuFormat
preview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;CustomerID&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan
--><%=FP_FieldVal(fp_rs,"CustomerID")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="23468" --> </td> <td>
<!--webbot
bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax"
s-column="CompanyName"b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientsideb-MenuFormat
preview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;CompanyName&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan
--><%=FP_FieldVal(fp_rs,"CompanyName")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="29451" --> </td> <td>
<!--webbot
bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax"
s-column="ContactName"b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientsideb-MenuFormat
preview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;ContactName&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan
--><%=FP_FieldVal(fp_rs,"ContactName")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="29292" --> </td> <td>
<!--webbot
bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax"
s-column="ContactTitle"b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientsideb-MenuFormat
preview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;ContactTitle&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan
--><%=FP_FieldVal(fp_rs,"ContactTitle")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="32621" --> </td> <td>
<!--webbot
bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax"
s-column="Address" b-tableformat="TRUE"b-hashtml="FALSE"
b-makelink="FALSE" clientside
b-MenuFormatpreview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Address&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan
--><%=FP_FieldVal(fp_rs,"Address")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="12103" --> </td> <td> <!--webbot
bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax"
s-column="City" b-tableformat="TRUE"b-hashtml="FALSE" b-makelink="FALSE"
clientside
b-MenuFormatpreview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;City&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan
--><%=FP_FieldVal(fp_rs,"City")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="4267" --> </td> <td> <!--webbot
bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax"
s-column="Region" b-tableformat="TRUE"b-hashtml="FALSE" b-makelink="FALSE"
clientside
b-MenuFormatpreview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Region&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan
--><%=FP_FieldVal(fp_rs,"Region")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="15114" --> </td> <td> <!--webbot
bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax"
s-column="PostalCode"b-tableformat="TRUE" b-hashtml="FALSE"
b-makelink="FALSE" clientsideb-MenuFormat
preview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;PostalCode&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan
--><%=FP_FieldVal(fp_rs,"PostalCode")%><!--webbot
bot="DatabaseResultColumn" endspan i-checksum="28780" --> </td> <td>
<!--webbot
bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax"
s-column="Country" b-tableformat="TRUE"b-hashtml="FALSE"
b-makelink="FALSE" clientside
b-MenuFormatpreview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Country&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan
--><%=FP_FieldVal(fp_rs,"Country")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="13796" --> </td> <td> <!--webbot
bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax"
s-column="Phone" b-tableformat="TRUE"b-hashtml="FALSE" b-makelink="FALSE"
clientside
b-MenuFormatpreview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Phone&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan
--><%=FP_FieldVal(fp_rs,"Phone")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="8388" --> </td> <td> <!--webbot
bot="DatabaseResultColumn"s-columnnames="CustomerID,CompanyName,ContactName,ContactTitle,Address,City,Region,PostalCode,Country,Phone,Fax"
s-column="Fax" b-tableformat="TRUE"b-hashtml="FALSE" b-makelink="FALSE"
clientside
b-MenuFormatpreview="&lt;fontsize=&quot;-1&quot;&gt;&amp;lt;&amp;lt;&lt;/font&gt;Fax&lt;fontsize=&quot;-1&quot;&gt;&amp;gt;&amp;gt;&lt;/font&gt;"startspan
--><%=FP_FieldVal(fp_rs,"Fax")%><!--webbot bot="DatabaseResultColumn"
endspan i-checksum="1677" --> </td> </tr> <!--webbot
bot="DatabaseRegionEnd" b-tableformat="TRUE"b-menuformat="FALSE"
u-dbrgn2="../../_fpclass/fpdbrgn2.inc" i-groupsize="5" clientside
tag="TBODY" startspan preview="&lt;tr&gt;&lt;td colspan=64
bgcolor=&quot;#FFFF00&quot;width=&quot;100%&quot;&gt;&lt;font
color=&quot;#000000&quot;&gt;This is theend of a Database
Resultsregion.&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;TR&gt;&lt;TD
VALIGN=MIDDLECOLSPAN=64&gt;&lt;NOBR&gt;&lt;INPUT TYPE=Button VALUE=&quot;
|&lt;&quot;&gt;&lt;INPUT TYPE=Button VALUE=&quot; &lt;
&quot;&gt;&lt;INPUTTYPE=Button VALUE=&quot; &gt; &quot;&gt;&lt;INPUT
TYPE=ButtonVALUE=&quot; &gt;|
&quot;&gt;[1/5]&lt;/NOBR&gt;&lt;BR&gt;&lt;/td&gt;&lt;/tr&gt;" --><!--#includefile="../../_fpclass/fpdbrgn2.inc"--><!--webbot
bot="DatabaseRegionEnd" endspan i-checksum="65064" --> </tbody>
 
K

Kathleen Anderson

Hi Henry:
You CAN touch the gray code - it's the maroon code you shouldn't touch. You
can control what fields are displayed when you run the Database Wizard. You
can add logic by modifying the SQL statement. This page:
http://www.spiderwebwoman.com/resources/dbrwtipsandtricks.asp has a lot of
resources and tutorials if you want to modify the code generated by the
Wizard.

--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
Expression Web Resources: http://www.spiderwebwoman.com/xweb/
FrontPage Resources: http://www.spiderwebwoman.com/resources/
Please reply to the newsgroup for the benefit of others
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top