|
This example shows the use of the
EditDeleteTemplate property. Please, select the delete
button to see the customized delete screen.
|
1 |
Chai
|
|
2 |
Chang
|
|
3 |
Aniseed Syrup
|
|
4 |
Chef Anton's Cajun Seasoning
|
|
5 |
Chef Anton's Gumbo Mix
|
|
|
|
This is the code implementing the example:
<!--#include file="VBSdb/inc.asp"-->
<%
VbsDbNew objVbsDb
objVbsDb( "MdbPath" ) = "data/nwind.mdb"
objVbsDb( "Sql" ) = "select * from Products"
objVbsDb( "ViewNavigationButtons" ) = "first;prev;next;last;removeFilter;search;delete"
objVbsDb( "GridFields" ) = "ProductName"
objVbsDb( "EditTableName" ) = "Products"
objVbsDb( "EditKeyFields" ) = "ProductID"
objVbsDb( "EditDeleteTemplate" ) = "EditDeleteTemplateExample.htm"
VbsDb objVbsDb
%>
This demonstrative program connects to
Nwind.mdb, the well known Microsoft Access sample database: the names of companies,
products, people,
characters, and/or data mentioned herein are fictious and are in no way
intended to represent any real individual, company, product, or event.
To download a copy of Nwind.mdb, please visit
Microsoft's site.
This is the html code for GridTemplateExample.htm, the template file used for this example:
<TABLE cellSpacing=1 cellPadding=1 width="100%" border=1>
<TR>
<TD align=right>Product Name:</TD>
<TD colSpan=3 align=left><VbsDbFieldValue>ProductName</VbsDbFieldValue></TD>
</TR>
<TR>
<TD align=right>Quantity per Unit:</TD>
<TD><VbsDbFieldValue>QuantityPerUnit</VbsDbFieldValue></TD>
<TD align=right>Units in Stock:</TD>
<TD><VbsDbFieldValue>UnitsInStock</VbsDbFieldValue></TD>
</TR>
<TR>
<TD align=right>Units on Order:</TD>
<TD><VbsDbFieldValue>UnitsOnOrder</VbsDbFieldValue></TD>
<TD align=right>Reorder Level:</TD>
<TD><VbsDbFieldValue>ReorderLevel</VbsDbFieldValue></TD>
</TR>
<TR>
<TD align=right> Discontinued:</TD>
<TD><VbsDbFieldValue>Discontinued</VbsDbFieldValue></TD>
<TD align=right>Unit Price:</TD>
<TD><VbsDbFieldValue>UnitPrice</VbsDbFieldValue></TD>
</TR>
<TR>
<TD align=center colspan=4><VbsDbInputSubmit> <VbsDbInputCancel></TD>
</TR>
</TABLE>
|