User specified SQL for grid column sort.
dbQP Abbr: csq
Version: All
Namespace:
TornadoVersion: All
Assembly: Tornado (in Tornado.dll) Version: 12.6.0.9 (1.0.0.0)
Syntax
| C# |
|---|
public string dbColSortSQL { get; set; } |
| Visual Basic (Declaration) |
|---|
Public Property dbColSortSQL As String |
Field Value
Mydb.dbColSortSQL="User supplied column sort SQL with embedded [[Col]] macros"
Remarks
Format of this SQL is - SELECT.... [[Col]]. The Tag [[Col]] must be included in the SQL statement
and it'll be replaced by the column ordinals of the sort column(s). If this property is blank then only
ORDER BY will be added to the existing SQL.
Normal single SELECT statement usually has the ORDER BY clause as the end. But in a complex compound SELECT statement, The clause might be placed in other places. This property is to provide user full control to handle that. The example shows the normal way to handle a simple SELECT statement using this user specifed SQL.
Rememebr that Fields ordinals is 0 based and ORDER BY field ordinals is 1 based.
Examples
The ORDER BY field ordinals will be placed in [[Col]].
CopyVB.NET
Dim CS As New Tornado.z With CS .dbQP = "U=12| S=17|Gdf=0,1,2,3,4|Sf=0,1,2,3|Isc=2,1|Sclj=t|ps=10| D=Nwind|" & _ "Q=Orders| Th=tit=Multi-Columns Sort with User SQL" .dbColSortSQL = "SELECT * FROM Orders WHERE Freight > 0 ORDER BY [[Col]]" .ASPdbNET() End With