Tornado API Library - V12.30.08

z.dbBookMark Property

Specify a Bookmark to identify a unique record for display and edit.

[VisualBasic]
PublicPropertydbBookMarkAsString
[C#]
publicstringdbBookMark{set;}

Property Value

Tablename;Bookmark Columns+Col+Col...

QuickProp Keyword Abbreviation

bm

Remarks

This property is crucial and mandatory to the Editing functions. The table name and criteria fields are used to construct or guess various SQLs. Bookmark enables a unique criteria to guarantee that the correct record is being edited. The classic ASP alternative was either to use recordset to modify a record in which is not accurate or to demand an Autonumber field to identify the record (DB product like Oracle has no Autonumber). A side note is that - this is why the transition of ASP-db to ASP-db.Net is so smooth as this bookmarking structure is generic and can be adapted to any changes in the future.

Example

* To Use only Column 0 as key - dbBookMark = "Table;0"

* To Use Columns 0, 1, 3 as key - dbBookMark = "Table;0+1+3"

A key is a combination of columns that uniquely identify the row.

<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
  Dim X As New tornado.z()
     X.dbQP = "U=1|S=15|D=Nwind|ni=b5,update, gridupdate|Q=Orders|" & _
       "Th=Title=Grid Edit|bm=orders;0+1|gdf=0,3,4,5,7"
     X.dbEditUpdateFlds = "fi=0|type=RONOUPDATE,4,5,7"
     X.dbEditGridUpdateFlds = "fi=0|type=RONOUPDATE,5,7"
     X.dbDebug = "EditAction"
     X.ASPdbNET()
End Sub
</script>

See Also

z Class | Tornado Namespace | dbEditAddFlds | dbEditUpdateFlds | dbTestBlankTable | Special Topic - Edit