QueryToXml

Execute a customized query against MyWakes database returning a result in XML format

public XmlDocument QueryToXml(bool <byHttps>, string <userName>, string <password>, QueryParameters <queryParameters>, ref char <messageType>, ref string <message>)

Parameters:

bool <byHttps> Set to true if you want to user https protocol otherwise, if you want to use http, set it to false
string <userName> A string containing the username assigned from MyWakes
string <password> A string containing the password for the MyWakes user
QueryParameters <queryParameters> A QueryParameters object containing command's specific parameters
ref char <messageType> A string containing output parameter that will return the type of message returned in <message> field: I=information, W=warning, E=error
ref string <message> A string containing output parameter with the message content

QueryParameters

int <Schema> Sets what have to be returned:
  • 0 (zero): returns query data without schema.
  • 1 (one): returns query data along the schema.
  • 2 (two): returns only the schema.
List<Field> <Fields> Represents a list of Field object
MyWakesTables <Table> Contains a MyWakesTables enum that is the list of allowed tables:
  • Actions
  • Alarms
  • AppLog
  • ChartFiles
  • Consumers
  • EmailLog
  • GeoAreas
  • GoogleFiles
  • GpsKeep
  • GpsKitt
  • GpsPhone
  • GpsPhonePlus
  • GpsPick
  • GpsOthers
  • GpsTomTom
  • MessagesReceived
  • MessagesSent
  • OBDII
  • PhoneLog
  • PointsOfInterest
  • SmsLog
  • Tracks
  • TrackPoints
  • Users
  • WebLog
List<WhereClause> <Where> Represents a list of WhereClause object
List<OrderClause> <Order> Represents a list of OrderClause object
UInt32? <MaxItem> Used for paging results. If set returns rows less than this value. Note that order to prevent your system from being flooded with oversized responses, the number of messages that will be returned on a single response is limited to 500.
UInt32? <MinItem> Used for paging results. If set returns rows greater than this value.

Field class

string <Name> Contain the name of the columns to retrieve from the query. If set to “*” will return all table's columns.
When used in OrderClause object it has to be an existing column of the selected table.
It can not contain spaces.

WhereClause class

string <Field> Can contain one of the following elements:
  • “(”: open parenthesis. Comparison and Value properties are ignored.
  • “)”: closed parenthesis. Comparison and Value properties are ignored.
  • “AND”: logic operator. Comparison and Value properties are ignored.
  • “OR”: logic operator. Comparison and Value property are ignored.
  • “NOT”: logic operator. Comparison and Value property are ignored.
  • <field name>: the name of the field to compare.
string <Comparison> Comparison operator. Can be:
  • “=”: equal.
  • “<”: lower then.
  • “>”: greater.
  • “<=”: lower/equal then.
  • “>=”: greater/equal than.
  • “<>”: different.
  • “LIKE”: similar, jolly character can be:
    • “%”: any string of zero or more characters. For instance “%computer%” gets all strings that contain “computer” word.
    • “_”: any single character. For instance “_ean” gets all 4-characters words that ends with “ean” (like Dean, Sean etc).
    • “[]”: single character included into an interval ([a-f]) or between a given set ([abcdef]). For instance “[C-P]arsen” returns all strings ending with “arsen” and beginning with a character from “C” to “P” like Carsen, Larsen, Karsen etc.
    • “[^]”: single character not included ingo an interval ([^a-f]) or into specified set ([^abcdef]). For instance “de[^l]%” gets all strings beginning with “de” and next letter is different from "l".
  • “IS NULL”: is null. Value property is ignored.
  • “IS NOT NULL”: is not null. Value property is ignored.
string <Value> Contains the value to compare. For numeric values the decimal separator is “.” (dot), dates are in “yyyyMMddhhmmss” format expressed in UTC time

OrderClause class

List<Field> <Fields> Represents a Field object
SortType <SortOrder> Contains a SortType enum that sets if the sorting of specified field has to be Ascending or Descending

Returned Type: XmlDocument

Returns an XML Document with the following structure:

<?xml version="1.0" encoding="utf-8" ?>
<furesult>
	<message><![CDATA[ OK ]]></message>
	<schema table="Tracks">
		... schema in XML ...
	</schema>
	<Tracks>
		... recordset in XML ...
	</Tracks>
</furesult>

 

Where

  • <message> contains OK or Error description
  • <schema> table schema in XML format (present only if schema parameter is set to 1 (one) or 2 (two)
  • <Tracks> this tag has the table name (in this example is “Tracks” but if the table is different, for instance “Actions” this tag will be <Actions>)
Terms Of Use | Privacy Statement | Company info
  • © Cedac Sistemi srl
  • Head office: Via Toscana, 3 40035 Castiglione dei Pepoli (Italy) Tel.: +39 0534-93811 Fax: +39 0534-93899
  • Branch office: Via del Lavoro, 47 40033 Casalecchio di Reno (Italy)
  • Branch office: Via Parini, 1 40033 Casalecchio di Reno (Italy)
  • Share capital Euro 26,000.00 - Company Register of Bologna / VAT no / fiscal code 01695261204