This example shows the use of the
FormExactAfterEdit property. Please,
note that the property FormExactAfterEdit is set to false.
Try to update a record different from the one you are pointing to.
After the update you come back to the Grid/Form screen,
but you are not positioned on the record you have just updated: VBSdb have not searched
for the record you have just edited. This way, the passage to the Grid/Form screen
has been faster.
In a similar way, if you add a new record, when you come back to the Grid/Form screen,
VBSdb doesn't search for the record you have just inserted: VBSdb sends you to the last
record in the grid, thus being faster.
Nevertheless, both add and updates properly edit your table. So, you can
set the FormExactAfterEdit property to false when speed is your
priority and you are not interested in pointing to the last edited record, when
coming back to the Grid/Form screen.
  |
1 |
Buchanan
|
Steven
|
3/4/1955
|
  |
2 |
Callahan
|
Laura
|
1/9/1958
|
  |
3 |
Davolio
|
Nancy
|
12/8/1948
|
  |
4 |
Dodsworth
|
Anne
|
1/27/1966
|
  |
5 |
Fuller
|
Andrew
|
2/19/1952
|
|
|
|
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( "GridHideFields" ) = "Title"
objVbsDb( "FormExactAfterEdit" ) = false
objVbsDb( "ViewNavigationButtons" ) = "first;prev;next;last;search;add"
objVbsDb( "EditTableName" ) = "Employees"
objVbsDb( "EditKeyFields" ) = "LastName;FirstName;BirthDate"
objVbsDb( "GlobalImageDir" ) = "VBSdb/images"
objVbsDb( "GridUpdateButtons" ) = true
objVbsDb( "GridDeleteButtons" ) = true
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.
|