|
This example shows the use of the
EditReadOnlyFields property.
If you press either the 'Add' or the 'Update' button you can see that the TitleOfCourtesy and the HireDate fields
are displayed as read only.
|
1 |
Davolio
|
Nancy
|
Sales Representative
|
12/8/1948
|
|
2 |
Fuller
|
Andrew
|
Vice President, Sales
|
2/19/1952
|
|
3 |
Leverling
|
Janet
|
Sales Representative
|
8/30/1963
|
|
4 |
Peacock
|
Margaret
|
Sales Representative
|
9/19/1937
|
|
5 |
Buchanan
|
Steven
|
Sales Manager
|
3/4/1955
|
|
|
|
This is the code implementing the example:
<!--#include file="VBSdb/inc.asp"-->
<%
VbsDbNew objVbsDb
objVbsDb( "MdbPath" ) = "data/nwind.mdb"
objVbsDb( "Sql" ) = "select LastName,FirstName,Title,BirthDate from Employees"
objVbsDb( "ViewNavigationButtons" ) = "first;next;prev;last;search;add;update;delete"
objVbsDb( "EditTableName" ) = "Employees"
objVbsDb( "EditKeyFields" ) = "LastName;FirstName;BirthDate"
objVbsDb( "EditReadOnlyFields" ) = "TitleOfCourtesy;HireDate"
%>
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.
|