In a query object, swap the record in the sourceRow with the record from the destinationRow.
queryRowSwap(query, sourceRow, destinationRow )
→ returns query
query.rowSwap(sourceRow, destinationRow)
This is Example1
qry=queryNew("rowid,name", "integer,varchar",[ [1, "Bob"],[2, "Theodore"],[3, "Jay"],[4, "William"] ]);
swap1=queryRowSwap(qry,1,4);
writeDump(swap1);
Using the member function.
qry=queryNew("rowid,name", "integer,varchar",[ [1, "Bob"],[2, "Theodore"],[3, "Jay"],[4, "William"] ]);
swap2=qry.rowSwap(1,4);
writeDump(swap2);
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.