# slxexecsql

### slxexecsql(queryString, dispMessages)

Execute a SQL SELECT statement against the SalesLogix database (sopurce or target).

NOTE: The dbExecSql()function is more powerful, and is recommended.

## Arguments

Argument | Data Type | Description
--- | --- | ---
queryString | String | SQL SELECT query to execute
dispError | boolean | Optional; tells Inaport to display an error message if there is an error when executing the SQL.

## Returns

The value that is the result of the query as a string.

## Description

Performs the query passed into the function. You need to build up the query using standard SQL SELECT statements.

Note that if you are using a field as a string parameter to the SQL, you will need to surround it with single quote characters as shown below:

"SELECT tableField FROM myTable WHERE primKey = '" & #myField & "'"

Note the single quote characters either side of where the field is inserted - they are hard to see.

## Examples

None