For the complete experience, please enable JavaScript in your browser. Thank you!

  • Creative Cloud
  • Photoshop
  • Illustrator
  • InDesign
  • Premiere Pro
  • After Effects
  • Lightroom
  • See all
  • See plans for: businesses photographers students
  • Document Cloud
  • Acrobat DC
  • eSign
  • Stock
  • Elements
  • Marketing Cloud
  • Analytics
  • Audience Manager
  • Campaign
  • Experience Manager
  • Media Optimizer
  • Target
  • See all
  • Acrobat Reader DC
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player
  • All products
  • Creative Cloud
  • Individuals
  • Photographers
  • Students and Teachers
  • Business
  • Schools and Universities
  • Marketing Cloud
  • Document Cloud
  • Stock
  • Elements
  • All products
  • Get Support
    Find answers quickly. Contact us if you need to.
    Start now >
  • Learn the apps
    Get started or learn new ways to work.
    Learn now >
  • Ask the community
    Post questions and get answers from experts.
    Start now >
    • About Us
    • Careers At Adobe
    • Investor Relations
    • Privacy  |  Security
    • Corporate Responsibility
    • Customer Showcase
    • Events
    • Contact Us
News
    • 3/22/2016
      Adobe Summit 2016: Are You An Experience Business?
    • 3/22/2016
      Adobe Announces Cross-Device Co-op to Enable People-Based Marketing
    • 3/22/2016
      Adobe and comScore Advance Digital TV and Ad Measurement
    • 3/22/2016
      Adobe Marketing Cloud Redefines TV Experience
CFML Reference / 

WddxRecordset object

Adobe Community Help


Applies to

  • ColdFusion

Contact support

 
By clicking Submit, you accept the Adobe Terms of Use.
 

Includes functions that you call as needed when constructing a WDDX record set. For more information on using this object, see Using WDDX in the Developing ColdFusion Applications.

Functions

Function syntax

Description

object.addColumn(name)

Adds a column to all rows in a WddxRecordset instance.

object.addRows(n)

Adds rows to all columns in a WddxRecordset instance.

object.dump(escapeStrings)

Displays WddxRecordset object data.

object.getField(row,col)

Returns the element in a row/column position.

object.getRowCount()

Indicates the number of rows in a WddxRecordset instance.

object.setField(row, col, value)

Sets the element in a row/column position.

object.wddxSerialize(serializer)

Serializes a record set.

Returns

HTML table of the WddxRecordset object data.

Usage

Convenient for debugging and testing record sets. The boolean parameterescapeStringsdetermines whether<>&characters in string values are escaped as&lt;&gt;&amp;in HTML.

Example

<!--- Create a simple query ---> 
<cfquery name = "q" datasource ="cfdocexamples"> 
SELECT Message_Id, Thread_id, Username, Posted 
FROM messages 
</cfquery> 
<!--- Load the wddx.js file, which includes the dump function ---> 
<script type="text/javascript" src="/CFIDE/scripts/wddx.js"></script> 
<script> 
// Use WDDX to move from CFML data to JS 
<cfwddx action="cfml2js" input="#q#" topLevelVariable="qj"> 
// Dump the record set 
document.write(qj.dump(true)); 
</script>

addColumn

Description

Adds a column to all rows in a WddxRecordset instance.

Syntax

object.addColumn( name )

Parameters

Parameter

Description

object

Instance name of the WddxRecordset object

name

Name of the column to add

Return value

None.

Usage

Adds a column to every row of the WDDX record set. Initially the new column’s values are set to NULL.

Example

This example calls theaddColumnfunction:

// Create a new record set 
rs = new WddxRecordset(); 

// Add a new column 
rs.addColumn("NewColumn"); 

// Extend the record set by 3 rows 
rs.addRows(3); 

// Set an element in the first row 
// newValue is a previously defined variable 
rs.setField(0, "NewColumn", newValue);

addRows

Description

Adds rows to all columns in a WddxRecordset instance.

Syntax

object.addRows( n )

Parameters

Parameter

Description

object

Instance name of the WddxRecordset object

n

Integer; number of rows to add

Return value

None.

Usage

This function adds the specified number of rows to every column of a WDDX record set. Initially, the row/column values are set to NULL.

Example

This example calls theaddRowsfunction:

// Create a new record set 
rs = new WddxRecordset(); 

// Add a new column 
rs.addColumn("NewColumn"); 

// Extend the record set by 3 rows 
rs.addRows(3); 

// Set an element in the first row 
// newValue is a previously defined variable 
rs.setField(0, "NewColumn", newValue);

getField

Description

Returns the element in the specified row/column position.

Syntax

object.getField( row, col )

Parameters

Parameter

Description

object

Instance name of the WddxRecordset object

row

Integer; zero-based row number of the value to return

col

Integer or string; column of the value to be returned.

Return value

Returns the value in the specified row/column position.

Usage

Call this function to access a value in a WDDX record set.

Example

This example calls thegetFieldfunction (the variable r is a reference to a WddxRecordset instance):

for (row = 0; row < nRows; ++row) 
{ 
o += "<tr>"; 
for (i = 0; i < colNames.length; ++i) 
{ 
o += "<td>" + r.getField(row, colNames[i]) + "</td>"; 
} 
o += "</tr>"; 
}

getRowCount

Description

Indicates the number of rows in a WddxRecordset instance.

Syntax

object.getRowCount( )

Parameters

Parameter

Description

object

Instance name of a WddxRecordset object

Return value

Integer. Returns the number of rows in the WddxRecordset instance.

Usage

Call this function before a looping construct to determine the number of rows in a record set.

Example

This example calls thegetRowCountfunction:

function dumpWddxRecordset(r) 
{ 
// Get row count 
nRows = r.getRowCount(); 
... 
for (row = 0; row < nRows; ++row) 
...

setField

Description

Sets the element in the specified row/column position.

Syntax

object.setField( row, col, value )

Parameters

Parameter

Description

object

Instance name of a WddxRecordset object

row

Integer; row that contains the element to set

col

Integer or string; the column containing the element to set

value

Value to set

Return value

None.

Usage

Call this function to set a value in a WddxRecordset instance.

Example

This example calls thesetFieldfunction:

// Create a new recordset 
rs = new WddxRecordset(); 

// Add a new column 
rs.addColumn("NewColumn"); 

// Extend the record set by 3 rows 
rs.addRows(3); 

// Set an element in the first row 
// newValue is a previously defined variable 
rs.setField(0, "NewColumn", newValue);

wddxSerialize

Description

Serializes a record set.

Syntax

object.wddxSerialize( serializer )

Parameters

Parameter

Description

object

Instance name of the WddxRecordset object

serializer

WddxSerializer instance

Return value

Returns a Boolean True if serialization was successful; False, otherwise.

Usage

This is an internal function; you do not typically call it.

Example

This example is from the WddxSerializerserializeValuefunction:

... 
else if (typeof(obj) == "object") 
{ 
if (obj == null) 
{ 
// Null values become empty strings 
this.write("<string></string>"); 
} 
else if (typeof(obj.wddxSerialize) == "function") 
{ 
// Object knows how to serialize itself 
bSuccess = obj.wddxSerialize(this); 
} 
...

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy

Choose your region United States (Change)   Products   Downloads   Learn & Support   Company
Choose your region Close

Americas

Europe, Middle East and Africa

Asia Pacific

  • Brasil
  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Cyprus - English
  • Česká republika
  • Danmark
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Greece - English
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • Malta - English
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • Southeast Asia (Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam) - English
  • 台灣

Commonwealth of Independent States

  • Includes Armenia, Azerbaijan, Belarus, Georgia, Moldova, Kazakhstan, Kyrgyzstan, Tajikistan, Turkmenistan, Ukraine, Uzbekistan

Copyright © 2016 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy | Cookies

AdChoices