ConsumerQueryToDataTable

Execute a customized query, against Consumers table in MyWakes database returning a DataTable

public DataTable ConsumerQueryToDataTable(bool <byHttps>, string <userName>, string <password>, ConsumerQueryParameters <consumerQueryParameters>, 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
ConsumerQueryParameters <consumerQueryParameters> A ConsumerQueryParameters 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

ConsumerQueryParameters

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
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 tracks lesser 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 tracks 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: DataTable

Returns a DataTable corresponding to input parameters.

If Schema parameter is set to 0 (zero), no schema will be returned and all fields will be string type; otherwise, if Schema parameter is set to 1 (one) or 2 (two) the Query will get the exact schema of all returned fields and this schema will be applied to the returned DataTable.

If Schema parameter is set to 2 (two) the DataTable will contain only columns headers without data.

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