Back to navigation bar   Edit

Properties
dbEditFlds, dbEditHideFlds, dbEditLookUpXRef, dbEditAddROFlds, dbEditUpdateROFlds, dbEditParams, dbButtonsOnOff

Edit Table
This list box is stuffed when a connection is made and all the tables of the connection is available. Note that while the display query can be complex JOINs, only one table can be edited at one time. An exception would be the multiple tables edit features. Therefore, the edit table can be within the same connection providing there is a Link field in between. Select the table and the fields will populate the Field listbox.

Fields
These are the fields of the selected edit table


Select the fields in the Fields listbox and hit this button will append to this listbox as the editing fields.


Select the fields in the Fields listbox and hit this button will append to this listbox as the editing hide fields.


This entry is mandatory and must contain the "bookmark" field(s) used to construct the edit query. For example - UPDATE Orders SET OrderAmount = 100, Freight = 50 WHERE ShipCountry = 'UK'
Note that the bookmark field is ShipCountry and the criteria created using the bookmark field identifies the record(s) to be edited. The default scope is "single" which means if more than (1) record match the  criteria, the edit will be cancelled. See "Record Scope".


This entry is mandatory if the editing table in not the current table defined by dbSQL. This "Link" field is one that serves as a criteria in pointing to the record(s) to be edited. Study the following example -

<%
Set X= Server.CreateObject("Asp.DB")
X.dbUnit = 1
X.dbMode="grid"
X.dbDSN = "NWIND"
SQL="SELECT Customers.CustomerID, CompanyName , OrderID, OrderDate as Odate FROM Customers "
SQL=SQL & "LEFT JOIN Orders ON Customers.CustomerID = Orders.CustomerID "
SQL=SQL & "where OrderID IS NOT Null ORDER BY OrderID "
X.dbSQL=SQL
X.dbNavigationItem="top,bottom,prev,next,edit,add,update,delete"
X.dbEditParams="TableName=Orders, EditLinkFlds=0+2, EditBookMarkFlds=0+1"
X.dbEditFlds="0,1,2,3,4,5"
X.dbEditUpdateROflds="0"
X.aspdb
%>



When this property is not blank, the default value of the field if any defined in dbEditFlds will be displayed as a Read-Only Field in the Add / Update screen. If there is no default in the dbEditFlds property, this property will be ignored. If EditDropFlds is present, these two  Read-Only properties will win the conflict. 


Generates the Edit Related properties. Since these properties are not of multi-part nature, there is no need to Reset. User can manually enter the default values of the EditFlds withinthe []. As special prefrogramed value - TimeStamp() willplace the current time into the box.


Left click to clear the above fields and right clear will clear the properties panel.

LookupXRef
Define the EditField and the Lookup Index to perform Lookup in Edit operations. This property is usually used with the RO operation.
Study the following example - 

<%
'Just hit update/delete and you'll see the XRef lookup.
Set X = Server.CreateObject("Asp.DB")
X.dbUnit = 1
X.dbMode="grid"
X.dbDSN = "NWIND"
X.dbSQL = "SELECT EmployeeID,LastName,FirstName,Title,ReportsTo from Employees Order By EmployeeID"
X.dbDisplayLookUpList ="(;|)ReportsTo||SELECT EmployeeID, FirstName & ' ' & Lastname as Name FROM Employees"
X.dbFilterDropFlds ="(;|)ReportsTo||||SELECT EmployeeID, FirstName & ' ' & Lastname as Name FROM Employees ORDER BY FirstName"
X.dbEditDropFlds ="(;|)ReportsTo||||SELECT EmployeeID, FirstName & ' ' & Lastname as Name FROM Employees"
X.dbEditLookUpXRef = "4,4"
X.dbEditUpdateROFlds="0"
X.dbEditAddROFlds="0"
X.dbEditFlds="0,1,2,3,4"
X.dbEditParams="TableName=employees, EditBookMarkFlds=0"
X.dbNavigationItem="top,bottom,prev,next,reload,filter,update,delete,Add"
X.ASPdb
%> 

Input RxC
Size of the Edit Input Box.

Size200RxC
Rows and Cols for data type 200 and 202. This type can be up to 2K bytes in size. Special provision is made to display that in a textarea.

RecordScope
Allow single or multiple records editing. For example, if records affected is > 1 and "Single" is specified, the editing action will be rolled back.

Validate JS Name
Name of user supplied JavasScript function to perform validation.

Edit Table Tag
Table tags for the edit screen.

Edit Date Format
This is the date format used to convert the input date while in editing mode. For example, a server is sitting in US with the US locale (mm/dd/yy) will need to convert the input date which has a different format (dd/mm/yy) from a browser sitting in Europe. There is no provision of autodetect the input locale. 

Cancel Button
Control the display of the "Cancel" button.

Drop Button
Control the display of the "Drop" button.

Edit Param Delimiter
This is the delimiter for the dbEditParams

Edit Flds Delimiter
This is the delimiter for dbEditFlds (;=group ,=field and [] for default wraps).

StickyUpdate
Enable update to stay in that mode without returning to view modes. (dbEditParams="StickyUpdate=True")

Edit/Update/Delete Icons
Place icons in grid to activate Edit functions.