|
|
|
|
This demo shows how easy and effective is use VBSdb to produce a web page that browses database data. In this sample, just 14 ASP instructions are used. Note that graphic buttons are used for navigation.
This is the code implementing the demo:
<!--#include file="VBSdb/inc.asp"-->
<% VbsDbNew objVbsDb objVbsDb( "MdbPath" ) = "../examples/data/demo.mdb" objVbsDb( "Sql" ) = "select * from designers inner join (projects inner join categories on projects.prCaId=categories.caId) " & _ "on designers.deId=projects.prDeId" objVbsDb( "GlobalFieldHeaders" ) = "prName|Project;prDeId|Designer;deLastName|Designer;" &_ "prCaId|Category;caName|Category;prImagePath|Image;prId|Id" objVbsDb( "GlobalImageDir" ) = "../examples/VBSdb/images" objVbsDb( "GridUpdateButtons" ) = true objVbsDb( "GridDeleteButtons" ) = true objVbsDb( "GridFields" ) = "prName;caName" objVbsDb( "FormFields" ) = "prName;caName;deLastName;prImagePath" objVbsDb( "ViewNavigationButtons" ) = "first;next;prev;last;removeFilter;search;add;update;delete" objVbsDb( "ViewFieldFormats" ) = "prImagePath|<img height=120 width=180 src='{{prImagePath}}' border=0>;" &_ "deLastName|<a href='mailto:{{deEMail}}'>{{deFirstName}} {{deLastName}}</a>" objVbsDb( "SearchFields" ) = "prName;prDeId;prCaId" objVbsDb( "InputSelectFields" ) = "prDeId|select deId,deLastName from designers;prCaId|select caId,caName from categories" objVbsDb( "EditTableName" ) = "projects" objVbsDb( "EditKeyFields" ) = "prId" VbsDb objVbsDb %> |