GetODBCValue |
Top Previous Next |
×V2.1Ø
Syntax - GetODBCValue <Variable Name> <Connection String> <Query> Where: <Variable Name> is the user defined name that is assigned to the variable. <Connection String> is a literal string or a variable that contains a literal string. <Query> is a literal string or a variable that contains a literal string.
Description: This command is used to add data to an established variable for use within the script that is the result of a database query. This command is to return one piece of data. If the query specified, returns more than one row or column, only the first column from the first row is returned and stored in the variable. <Variable Name> identifies the variable to be used to store the data. <Connection String> defines a valid ODBC connection string that specifies the data source along with all necessary connection information. <Query> is a query statement that is valid for the specified data source and returns tabular data.
Note: The <Connection String> can be a direct reference to a data source, or it can utilize a DSN (Data Source Name) that is already installed on the EMUE PC. A valid ODBC connection string can be used to retrieve data from Microsoft Access, Excel, SQL Server, and most other commercial database formats.
Sample: The following line returns the first PtID from the PatientList and stores it in var1. GetODBCValue var1 "Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\PTDB\PTDB.MDB;" "SELECT PTID, FROM [PatientList];"
|