|
This example shows the use of the
VbsDbGetLastAction method. Navigate through
different VBSdb screens and look at the text displayed above the top left corner of the grid.
Last action was NonVbsDb.
|
1 |
Davolio
|
Nancy
|
12/8/1948
|
|
2 |
Fuller
|
Andrew
|
2/19/1952
|
|
3 |
Leverling
|
Janet
|
8/30/1963
|
|
4 |
Peacock
|
Margaret
|
9/19/1937
|
|
5 |
Buchanan
|
Steven
|
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 EmployeeId,LastName,FirstName,Title,BirthDate from Employees"
objVbsDb( "GridFields" ) = "LastName;FirstName;BirthDate"
objVbsDb( "ViewNavigationButtons" ) = "first;next;prev;last;search;add;update;delete"
objVbsDb( "EditTableName" ) = "Employees"
objVbsDb( "EditKeyFields" ) = "EmployeeId"
objVbsDb( "EditFields" ) = "LastName;FirstName;Birthdate"
strLastAction = VbsDbGetLastAction( objVbsDb )
response.write "<p>Last action was <b>" & strLastAction & "</b>."
VbsDb objVbsDb
VbsDbClose 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.
|