S
Skc
The code below is a DRW for a table in my database to be displayed on my asp
page:
<!--webbot bot="DatabaseRegionStart" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-columntypes="3,202,202,202,202,202,202,202,202,202,3"
s-dataconnection="Database1" 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="tblCompany"
s-displaycolumns="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-criteria s-order s-sql="SELECT * FROM tblCompany" b-procedure="FALSE"
clientside SuggestedExt="asp" s-DefaultFields
s-NoRecordsFound="No records returned." i-MaxRecords="256" i-GroupSize="5"
BOTID="0" u-dblib="fpweb:///_fpclass/fpdblib.inc"
u-dbrgn1="fpweb:///_fpclass/fpdbrgn1.inc"
u-dbrgn2="fpweb:///_fpclass/fpdbrgn2.inc" tag="TBODY"
local_preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left"
width="100%"><font color="#000000">Database Results regions will not preview
unless this page is fetched from a Web server with a web browser. The
following table row will repeat once for every record returned by the
query.</font></td></tr>"
preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left"
width="100%"><font color="#000000">This is the start of a Database Results
region. The region will not work unless the page has a file extension of
".asp". 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.</font></td></tr>" --><!--#include
file="fpweb:///_fpclass/fpdblib.inc"-->
<%
fp_sQry="SELECT * FROM tblCompany"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=11 align=left width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="Database1"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=5
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=11
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="fpweb:///_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" I-CheckSum="4409" endspan -->
<tr>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="CompanyID" b-tableformat="TRUE" b-hasHTML="FALSE" clientside
local_preview="<font size="-1"><<</font>CompanyID<font
size="-1">>></font>"
preview="<font size="-1"><<</font>CompanyID<font
size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"CompanyID")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="16577" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Name" b-tableformat="TRUE" b-hasHTML="FALSE"
clientside
local_preview="<font size="-1"><<</font>Company_Name<font
size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Name<font
size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Company_Name")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="28973" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Contact" b-tableformat="TRUE" b-hasHTML="FALSE"
clientside
local_preview="<font size="-1"><<</font>Company_Contact<font
size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Contact<font
size="-1">>></font>"
--><%=FP_FieldVal(fp_rs,"Company_Contact")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="38598" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Address1" b-tableformat="TRUE" b-hasHTML="FALSE"
clientside
local_preview="<font size="-1"><<</font>Company_Address1<font
size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Address1<font
size="-1">>></font>"
--><%=FP_FieldVal(fp_rs,"Company_Address1")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="37819" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Address2" b-tableformat="TRUE" b-hasHTML="FALSE"
clientside
local_preview="<font size="-1"><<</font>Company_Address2<font
size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Address2<font
size="-1">>></font>"
--><%=FP_FieldVal(fp_rs,"Company_Address2")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="37851" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Address3" b-tableformat="TRUE" b-hasHTML="FALSE"
clientside
local_preview="<font size="-1"><<</font>Company_Address3<font
size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Address3<font
size="-1">>></font>"
--><%=FP_FieldVal(fp_rs,"Company_Address3")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="37883" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Postcode" b-tableformat="TRUE" b-hasHTML="FALSE"
clientside
local_preview="<font size="-1"><<</font>Company_Postcode<font
size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Postcode<font
size="-1">>></font>"
--><%=FP_FieldVal(fp_rs,"Company_Postcode")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="41590" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Mem_Status" b-tableformat="TRUE" b-hasHTML="FALSE"
clientside
local_preview="<font
size="-1"><<</font>Company_Mem_Status<font size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Mem_Status<font
size="-1">>></font>"
--><%=FP_FieldVal(fp_rs,"Company_Mem_Status")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="55861" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Email_Address" b-tableformat="TRUE"
b-hasHTML="FALSE"
clientside
local_preview="<font
size="-1"><<</font>Company_Email_Address<font size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Email_Address<font
size="-1">>></font>"
--><%=FP_FieldVal(fp_rs,"Company_Email_Address")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="60184" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Password" b-tableformat="TRUE" b-hasHTML="FALSE"
clientside
local_preview="<font size="-1"><<</font>Company_Password<font
size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Password<font
size="-1">>></font>"
--><%=FP_FieldVal(fp_rs,"Company_Password")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="40068" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Security_Rights" b-tableformat="TRUE"
b-hasHTML="FALSE" clientside
local_preview="<font
size="-1"><<</font>Company_Security_Rights<font
size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Security_Rights<font
size="-1">>></font>"
--><%=FP_FieldVal(fp_rs,"Company_Security_Rights")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="62392" endspan -->
</td>
</tr>
<!--webbot bot="DatabaseRegionEnd" startspan b-tableformat="TRUE"
b-menuformat="FALSE" u-dbrgn2="fpweb:///_fpclass/fpdbrgn2.inc"
i-groupsize="5" clientside tag="TBODY"
local_preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left"
width="100%"><font color="#000000">This is the end of a Database Results
region.</font></td></tr><TR><TD ALIGN=LEFT VALIGN=MIDDLE
width="100%"><font color="#000000">This is the end of a Database Results
region.</font></td></tr><TR><TD ALIGN=LEFT VALIGN=MIDDLE
COLSPAN=64><NOBR><INPUT TYPE=Button VALUE=" |< "><INPUT TYPE=Button VALUE="
< "><INPUT TYPE=Button VALUE=" > "><INPUT TYPE=Button VALUE=" >| ">
[1/5]</NOBR><BR></td></tr>" --><!--#include
file="fpweb:///_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" I-CheckSum="23298" endspan -->
</tbody>
However, I want to do away with this DRW, and create a custom made code that
connects to my database, runs an SQL and displays a table with <%=Fieldname%>
in the table (formatted).
Can someone give me some pointers on this and list me a simple example for
me to expand on.
Thanks
page:
<!--webbot bot="DatabaseRegionStart" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-columntypes="3,202,202,202,202,202,202,202,202,202,3"
s-dataconnection="Database1" 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="tblCompany"
s-displaycolumns="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-criteria s-order s-sql="SELECT * FROM tblCompany" b-procedure="FALSE"
clientside SuggestedExt="asp" s-DefaultFields
s-NoRecordsFound="No records returned." i-MaxRecords="256" i-GroupSize="5"
BOTID="0" u-dblib="fpweb:///_fpclass/fpdblib.inc"
u-dbrgn1="fpweb:///_fpclass/fpdbrgn1.inc"
u-dbrgn2="fpweb:///_fpclass/fpdbrgn2.inc" tag="TBODY"
local_preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left"
width="100%"><font color="#000000">Database Results regions will not preview
unless this page is fetched from a Web server with a web browser. The
following table row will repeat once for every record returned by the
query.</font></td></tr>"
preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left"
width="100%"><font color="#000000">This is the start of a Database Results
region. The region will not work unless the page has a file extension of
".asp". 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.</font></td></tr>" --><!--#include
file="fpweb:///_fpclass/fpdblib.inc"-->
<%
fp_sQry="SELECT * FROM tblCompany"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=11 align=left width=""100%"">No records
returned.</td></tr>"
fp_sDataConn="Database1"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=5
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=11
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="fpweb:///_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" I-CheckSum="4409" endspan -->
<tr>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="CompanyID" b-tableformat="TRUE" b-hasHTML="FALSE" clientside
local_preview="<font size="-1"><<</font>CompanyID<font
size="-1">>></font>"
preview="<font size="-1"><<</font>CompanyID<font
size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"CompanyID")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="16577" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Name" b-tableformat="TRUE" b-hasHTML="FALSE"
clientside
local_preview="<font size="-1"><<</font>Company_Name<font
size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Name<font
size="-1">>></font>" --><%=FP_FieldVal(fp_rs,"Company_Name")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="28973" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Contact" b-tableformat="TRUE" b-hasHTML="FALSE"
clientside
local_preview="<font size="-1"><<</font>Company_Contact<font
size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Contact<font
size="-1">>></font>"
--><%=FP_FieldVal(fp_rs,"Company_Contact")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="38598" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Address1" b-tableformat="TRUE" b-hasHTML="FALSE"
clientside
local_preview="<font size="-1"><<</font>Company_Address1<font
size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Address1<font
size="-1">>></font>"
--><%=FP_FieldVal(fp_rs,"Company_Address1")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="37819" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Address2" b-tableformat="TRUE" b-hasHTML="FALSE"
clientside
local_preview="<font size="-1"><<</font>Company_Address2<font
size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Address2<font
size="-1">>></font>"
--><%=FP_FieldVal(fp_rs,"Company_Address2")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="37851" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Address3" b-tableformat="TRUE" b-hasHTML="FALSE"
clientside
local_preview="<font size="-1"><<</font>Company_Address3<font
size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Address3<font
size="-1">>></font>"
--><%=FP_FieldVal(fp_rs,"Company_Address3")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="37883" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Postcode" b-tableformat="TRUE" b-hasHTML="FALSE"
clientside
local_preview="<font size="-1"><<</font>Company_Postcode<font
size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Postcode<font
size="-1">>></font>"
--><%=FP_FieldVal(fp_rs,"Company_Postcode")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="41590" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Mem_Status" b-tableformat="TRUE" b-hasHTML="FALSE"
clientside
local_preview="<font
size="-1"><<</font>Company_Mem_Status<font size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Mem_Status<font
size="-1">>></font>"
--><%=FP_FieldVal(fp_rs,"Company_Mem_Status")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="55861" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Email_Address" b-tableformat="TRUE"
b-hasHTML="FALSE"
clientside
local_preview="<font
size="-1"><<</font>Company_Email_Address<font size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Email_Address<font
size="-1">>></font>"
--><%=FP_FieldVal(fp_rs,"Company_Email_Address")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="60184" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Password" b-tableformat="TRUE" b-hasHTML="FALSE"
clientside
local_preview="<font size="-1"><<</font>Company_Password<font
size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Password<font
size="-1">>></font>"
--><%=FP_FieldVal(fp_rs,"Company_Password")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="40068" endspan -->
</td>
<td><!--webbot bot="DatabaseResultColumn" startspan
s-columnnames="CompanyID,Company_Name,Company_Contact,Company_Address1,Company_Address2,Company_Address3,Company_Postcode,Company_Mem_Status,Company_Email_Address,Company_Password,Company_Security_Rights"
s-column="Company_Security_Rights" b-tableformat="TRUE"
b-hasHTML="FALSE" clientside
local_preview="<font
size="-1"><<</font>Company_Security_Rights<font
size="-1">>></font>"
preview="<font size="-1"><<</font>Company_Security_Rights<font
size="-1">>></font>"
--><%=FP_FieldVal(fp_rs,"Company_Security_Rights")%><!--webbot
bot="DatabaseResultColumn" I-CheckSum="62392" endspan -->
</td>
</tr>
<!--webbot bot="DatabaseRegionEnd" startspan b-tableformat="TRUE"
b-menuformat="FALSE" u-dbrgn2="fpweb:///_fpclass/fpdbrgn2.inc"
i-groupsize="5" clientside tag="TBODY"
local_preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left"
width="100%"><font color="#000000">This is the end of a Database Results
region.</font></td></tr><TR><TD ALIGN=LEFT VALIGN=MIDDLE
preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left"COLSPAN=64> said:| "> [1/5]</NOBR></FORM></td></tr>"
width="100%"><font color="#000000">This is the end of a Database Results
region.</font></td></tr><TR><TD ALIGN=LEFT VALIGN=MIDDLE
COLSPAN=64><NOBR><INPUT TYPE=Button VALUE=" |< "><INPUT TYPE=Button VALUE="
< "><INPUT TYPE=Button VALUE=" > "><INPUT TYPE=Button VALUE=" >| ">
[1/5]</NOBR><BR></td></tr>" --><!--#include
file="fpweb:///_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" I-CheckSum="23298" endspan -->
</tbody>
However, I want to do away with this DRW, and create a custom made code that
connects to my database, runs an SQL and displays a table with <%=Fieldname%>
in the table (formatted).
Can someone give me some pointers on this and list me a simple example for
me to expand on.
Thanks