Determines how cursors are sent over the wire from the server side.
0 - XML * (default if not specified) using wwXML
1 - VFP 7 CURSORTOXML/XMLTOCURSOR
2 - EncodeDBF() encoded VFP cursors
2 sends an EncodeDBF() encoded cursor, but only if a cursor is returned. All other responses (errors, non-cursor results, stored procedure values) still are returned as XML. Note that you cannot return both a return value and a cursor using this Transport mode - only a cursor or only a stored procedure value can be returned but not both at once. This does work with XML.
o.nTransportMode
Remarks
Mode 2 can be more efficient and causes less overhead on the server, but will only work with a VFP client while XML will allow any client to access the data. Note that pure XML clients can specify this value as transportmode in the request XML so VFP clients can ask for data in the more efficient EncodeDBF() format while non-VFP clients can ask for it in XML.
Mode 2 also one severe limitation: Fieldnames must be 10 characters or less (standard DBF format) behavior as the files are persisted as DBF files. This is especially important for SQL Server access on the backend. If any single field exceeds 10 character name you MUST use XML or field names will be truncated. This can be very problematic for wwBusiness' update mechanisms which can cause mismatched field names on the client and server which will cause errors.
In local tests it appears that there rarely is an advantage of using Mode 2. Mode 1 tends to be the most efficient for overall speed although the data size may be bigger than Mode 2. Mode 2 can also support binary data were XML cannot at least on the query side (Mode 2 has no effect on updates or data sent to the server as everything is wrapped in XML via SQL commands or Stored Proc calls).
Note that you can mix and match data modes for specific queries as needed to get best performance. You can experiment with performance results using the Distributed HTTP Query Sample (wwHTTPDemo.app), which allows you to test the various combinations.
For overall best performance in a VFP environment Mode 1 is probably most efficient. For an open XML environment Mode 0 probably works best as it has a cleaner XML interface. Mode 2 can work best for smallest data transmit size and for retrieving binary content.
See also:
Class wwHTTPSQL© West Wind Technologies, 1996-2024 • Updated: 02/07/02
Comment or report problem with topic