Skip to main content

ReturnFromSQL

Structure

ReturnFromSQL(sSQL)

Parameters

ParameterTypeDescription
sSQLStringthe sql to be run against the IndySoft database. This sql should return only 1 field, and only the top record will be returned. The text should NOT end with a semicolon.

Return value

String

Description

This function is used to execute sql against the IndySoft database and return a single field and single record of data. So this function should only be used for returning precise information, typically used to populate other event fields. Note: this function requires uppercase for SQL keywords such as WHERE, FROM, UPDATE, DELETE, INSERT, etc.

Example

sOwner = ReturnFromSQL('SELECT GAGE_OWNER FROM GAGES WHERE COMPANY = '' &
LookupEquipmentCompany & '' AND GAGE_SN = '' & LookupEquipmentID & ''')
ShowMessage('This gage is owned by ' & sOwner)

See also

RunSQL