GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Eight — Data Functions (continued)
Overview
The ODBCConnect function establishes a connection with a host server and returns an ODBC Connection Object handle.
Syntax/Parameters
Syntax
handle = ODBCConnect ( string data );
Parameters
data
A string that contains data parameters including the source name for the driver connection. It usually contains a series of parameters specific to the host connection. See Remarks section for more details.
Return Value
Returns a handle to an ODBC Connection Object or NULL_HANDLE on failure. Use the GetLastError to retrieve error information. The GetLastErrorMessage function will generally return error details specific to the ODBC driver being employed.
Remarks
In order to establish an ODBC connection, the Windows ODBC Data Source Administrator must be run to setup a driver that provides a link to the host. See the discussion at the start of this section for more information.
The data string is a series of command parameters starting with the driver designation and followed by parameters specific to the host connection. For example:
Driver=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);Dbq=D:\Data\MyExcel.xlsx
The ‘Driver’ parameter must match exactly one of the drivers located in the ODBC Data Source Administrator panel. For example:
The driver can also be referenced by the name:
DSN=Excel Files;Dbq=D:\Data\MyExcel.xlsx
See MSDN and specific database implementation documentation for more information.
Executing this function may result in queries being directed to the user if the connection is not setup correctly or if a connect to the database server cannot be negotiated.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.