wwbusiness::convertdata

Converts data from a cursor or the current object into the requested resultmode.

o.convertdata(lnResultMode, lcDocRoot, lcTable, lcRow)

Return Value

.T. or .F.
cResultXML is set for XML results
vResult is set for ADO recordsets

Parameters

lnResultMode
Cursor XML Modes
0 - VFP Cursor (just returns)
1 - XML from cursor
2 - XML from cursor with Schema
3 - XML from cursor with DTD
5 - XML from Cursor using VFPs CursorToXML
6 - XML from Cursor using VFPs CursorToXML with Schema

Object XML Modes:
11 - XML from oData member
12 - XML from oData member with Schema
13 - XML from oData member with DTD
20 - XML from object hierarchical (No Schema/DTD)

Miscellaneous Modes:
30 - ADO recordset from cursor (into vResult)
40 - Binary conversion of VFP cursor (EncodeDbf) (into vResult)

lcDocRoot
Optional - Docroot element name for generated XML

lcTable
Optional - table level element name

lcRow
Optional - row level element name


Remarks

XML results are streamed into the cResultXML property. All non-XML result is streamed into the vResult property.

The cursor export methods work on the currently open cursor so the following works:

o = CREATE('wwbusiness')
use tt_cust
o.ConvertData(2)

ShowXML(o.cResultXML)

Usually you'll want to use Query() with the lnResultMode parameter set.

See also:

Class wwbusiness | wwbusiness::importdata


  Last Updated: 1/9/2002 | © West Wind Technologies, 2008