ssCore.ADO.setRowFormat

Select the format of returned row data.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

format - [Optional] - A string that identifies the new row format. Valid values include: XML,CSV,URL,DLM,XML_Attribs,XML_Nodes. Default value is XML.


Output Parameters:

No output parameters.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.ADO.setRowFormat( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.ADO.setRowFormat( paramsObject );


Notes:

If you don't call ADO.setRowFormat, "XML" will be used (this is the same as XML_ATTRIBS) as the default for calls to ADO.getCurrentRow, ADO.move, ADO.moveBy, ADO.moveFirst, ADO.moveLast, ADO.moveNext, ADO.movePrevious and ADO.moveTo functions.

In XML (and XML_ATTRIBS) format each row is returned in a simple structure (shown below). The <field> will be repeated as many times as necessary in a <row>. Each field value is URL encoded so special characters aren't a problem and can be decoded using the Flash unescape() function.

<row><field name="field1" value="value1" \><field name="field2" value="value2" \>...</row>.

In XML_NODES format each row is returned in a simple structure (shown below). Each field from the database will appear as its own tag in the <row>. Each field value is URL encoded so special characters aren't a problem and can be decoded using the Flash unescape() function.

<row><field1>value1</field1><field2>value2</field2>...</row>

In CSV format, the field values are returned in the same order as they appear in the field list (ADO.getFieldList) . If a field value contains a double quote character, it will be escaped (doubled up) within the string. This format is a little more difficult to parse than the URL format (see below). You can't just split the string at the commas because the fields could contain commas (which aren't escaped).

"value1","value2",...

In URL format, the field values are returned in the same order as they appear in the field list (ADO.getFieldList). Each field value is URL encoded so special characters aren't a problem and the row can easily be split at the commas and individual fields decoded using the Flash unescape() function.

value1,value2,...

DLM (delimited) is an unquoted value delimited format. The default delimiter is the pipe ("|") symbol. The delimiter can be changed using the ADO.setDelimiter function.

value1|value2|value3...

                

Examples:

ssCore.ADO.setRowFormat({format:"URL"});