Thread Rating:
  • 288 Vote(s) - 2.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Print data
04-03-2017, 02:42 PM,
#2
RE: Print data
dump (macro) dumps specified values.
However, Recordset is a class object, not a value.
Therefore, the following code is necessary to dump data registered using the record set

Code:
{curl 8.0 applet}

{define-proc {output-recordset rs:RecordSet}:void
    {for f in rs.fields do
        {outfmt {format "%s, ", f.name}}
    }
    {outfmt "\n"}
    
    {for r in rs do
        {for f in rs.fields do
            {outfmt {format "%s, ", r[f.name]}}
        }
        {outfmt "\n"}
    }
}

{let people:RecordSet =
    {RecordSet
        {RecordFields
            {RecordField
                "First", caption = "First Name", domain = String
            },
            {RecordField
                "Last", caption = "Last Name", domain = String
            },
            {RecordField
                "Age", domain = int
            }
        },
        {RecordData First = "John", Last = "Smith", Age = 25},
        {RecordData First = "Jane", Last = "Smith", Age = 29},
        {RecordData First = "Jane", Last = "Jones", Age = 28}
    }
}

{output-recordset people}



Messages In This Thread
Print data - by NamDH - 04-03-2017, 11:17 AM
RE: Print data - by dyoshida - 04-03-2017, 02:42 PM
RE: Print data - by NamDH - 04-03-2017, 05:03 PM
RE: Print data - by dyoshida - 04-03-2017, 05:49 PM
RE: Print data - by NamDH - 04-03-2017, 07:05 PM
RE: Print data - by dyoshida - 04-04-2017, 02:27 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  Using cURL command, how do we fetch stock data which comes back *WITHOUT comm Scotland Warrior 1 3,473 01-16-2015, 10:09 AM
Last Post: dyoshida
  次の meta-data 値を使用しています? umemura 2 4,727 12-09-2013, 03:01 PM
Last Post: umemura
  Weird behaviour while receiving the data rupesh.shukla 0 3,051 11-29-2012, 12:34 AM
Last Post: rupesh.shukla
  How to submit data on web pages using script..? PANDIYAN107 1 3,287 06-11-2012, 04:00 PM
Last Post: alchimiste
  print-graphic-pdfに関して nmyzk 1 3,446 05-11-2012, 05:23 PM
Last Post: nmyzk
  Problemm with separating header and data using curl Khushi 3 10,855 12-13-2011, 10:37 AM
Last Post: c-s
Tongue print-graphic-pdfプロシージャの仕様について 森口 慶紀 1 3,625 09-30-2011, 06:36 PM
Last Post: 森口 慶紀
Forum Jump:


Users browsing this thread:
1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('1443')