sgrProcuraCidade
Lists the cities registered according to the search parameters.
PARAMETERS
| Field | Type | Req. | Description |
|---|---|---|---|
| keyaccess | string | Yes | Key returned by the sgrLogin method. |
| typesearch | string | Yes | Enter 'N' to search by city name, or 'C' to query a code. |
| parametro | string | No | Parameter used in the search. If searching by name (typesearch = n), and the parameter is null, it lists all cities. Passing the parameter is mandatory when searching by code (typesearch = c). |
METHOD RETURN:
ReturnDataset: If the parameters are correct, the property will display:
| Field | Type | Description |
|---|---|---|
| CDCID | integer | City Code |
| DSCITY | string | City Name |
| DSUF | string | State Acronym |
| CDPAIS | integer | Country Code |
| DSPAIS | string | Country Name |
| CDIBGE | integer | City IBGE code |
ReturnDescription: If there is an error when executing the method, the property will display:
| Error | Description |
|---|---|
| Invalid parameter type: | must be 'C' to search by code, or 'N' by name. |
| There are no cities with the parameter entered! |