Export Column(s) of a grid in Raw or MagicCell format.
Mydb.dbExportCols="ColNameNumber1,(ColNameNumber2),..."
| Keyword | Description |
|---|---|
| ColNameNumber | Which (Entire) Col(s) in record to export. Export will be in a two dimension array retrieved by Tornado.GetData.Get_Cexport. (field) = Raw Format. |
User should process the two different export types accordingly using a 1 or 2 dimension array.
<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
Dim GD As New Tornado.Getdata()
Dim Export As New Tornado.Z()
With Export
.dbUnit = 13
.dbSkin=13
.dbMode = "ty=dual-horiz|sysindex=true"
.dbGridDisplayFlds = "0,1,2,3,4,5"
.dbPageSize = 10
.dbDSN = "Nwind.mdb"
.dbSQL = "Select * From products"
.dbGridMagicCell = "field=0|macro=My ID is - #0#"
.dbExportFlds = "(0),1,2,3"
.dbExportCols = "4,(5)"
.dbTextHolder="Title=Tornado Demo - Export Rows and Columns"
.ASPdbNET()
End With
'------ User Code to process Exported data --------
Response.Write("<Center><P><table class=ts cellspacing='1'><tr><td
class='GH' COLSPAN=4>Export Fields 0, 1, 2 & 3 (Row)</td><tr>")
Dim c As Integer
Dim r As Long
Dim arr() As String = GD.Get_Fexport '1 Dim array
For c = 0 To UBound(arr)
Response.Write("<td class=nr align=center>" & arr(c) & "</td>")
Next c
Response.Write("</tr></table>")
Response.Write("<Center><P><table class=ts cellspacing='1'><tr><td
class='GH' COLSPAN=2>Export Columns 4 and 5</td>")
Dim Carr(,) As String = GD.Get_Cexport '2 Dim array
For r = 0 To UBound(Carr, 2)
Response.Write("<tr>")
For c = 0 To UBound(Carr, 1)
Response.Write("<td class=nr align=center>" & Carr(c,r) & "</td>")
Next c
Response.Write("</tr>")
Next r
Response.Write("</table></center>")
End Sub
</script>
z Class | Tornado Namespace | dbExportFlds | Get_Cexport