Tornado API Library - V12.30.08

z.dbExportCols Property

Export Column(s) of a grid in Raw or MagicCell format.

Product Version

All
[VisualBasic]
PublicPropertydbExportColsAsString
[C#]
publicstringdbExportCols{set;}

Property Value

Mydb.dbExportCols="ColNameNumber1,(ColNameNumber2),..."

KeywordDescription
ColNameNumberWhich (Entire) Col(s) in record to export. Export will be in a two dimension array retrieved by Tornado.GetData.Get_Cexport. (field) = Raw Format.

QuickProp Keyword Abbreviation

xc

Remarks

User should process the two different export types accordingly using a 1 or 2 dimension array.

Example

<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>

See Also

z Class | Tornado Namespace | dbExportFlds | Get_Cexport