This web service lets the user execute the SQL query.
Usage:
ExecuteQueryResult
= A.ExecuteQuery(UserName, UserPassword, query, numberOfRecords)
Parameters
UserName and UserPassword are not used at this moment.
Input Parameters
Parameter | Type | Detail |
query | String | System will automatically add “SELECT ” to the query string. For example, if user wants to execute SQL command “SELECT ORDER_NO FROM CPORDHDR,” he/she needs to set this query string as “ORDER_NO FROM CPORDHDR.” |
numberOfRecords | String | Maximum number of returned records. |
ExecuteQueryResult Structure
Property Name | Type | Detail |
ReturnCode | Integer | 0 = OK 10001 = missing query |
Data | DataSet | Contains a data table (table name “Data”). The rows in data table depends on your query. |
ReturnMsg | String | If a database error is encountered, the error number is returned in the ReturnCode property and the error message text is return in the ReturnMsg property. |
Code Example
The following sample code will make an order inquiry.
0 = OK
30000 = Database Error
30001 = No Record Found or web services is not turned on in Global Setup
30002 = General Error