Connection Properties You Can Access with SQLGETPROP()Last reviewed: October 23, 1995Article ID: Q132231 |
The information in this article applies to:
SUMMARYIn Visual FoxPro, you can view the current property settings for a connection by using the SQLGETPROP() command with the respective connection handle. This article lists the connection properties that can be accessed with SQLGETPROP() and shows how to use SQLGETPROP(). This information is also available under SQLSETPROP() in the Visual FoxPro Help file.
MORE INFORMATIONIn Visual FoxPro, you can use SQLGETPROP() to display the information used to create the active connection, to work with shared connections, to control interface display and time intervals, and to fetch result sets into view cursors. You can also use it to ensure that active connections are deactivated after a specified time interval, to manage transactions, and to display internal ODBC handles. SQLGETPROP() returns the current or default settings for an active connection. SQLGETPROP() returns a numeric value to describe the setting. To view the current property settings for a connection, use SQLGETPROP() with the respective connection handle using the following syntax:
SQLGETPROP(nConnectionHandle, cSetting)For example, the following command reads the setting for the "asynchronous" connection property:
SQLGETPROP(gnConnHandle, 'asynchronous')The nConnectionHandle parameter specifies the connection handle to the data source returned by SQLCONNECT(). If you specify 0 for the active connection, SQLGETPROP() returns the default setting. If a connection level error occurs, -1 is returned. If an environment level error occurs, -2 is returned. The cSetting parameter specifies the setting.
Connection Properties AvailableThe connection properties that can be accessed with SQLGETPROP() are listed below in functional groups. To display the information used to create the active connection:
For more information about documentation error regarding the ConnectName property and the SQLGETPROP() function, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q137408 TITLE : DOCERR: Can't Use ConnectName Property w/SQLGETPROP() FunctionTo work with shared connections:
(2) If a connection is deactivated, the ODBChdbc and ODBChstmt values are no longer valid.NOTE: See SQLSETPROP() in the Visual FoxPro Help file for a list of the settings you can set with the SQLSETPROP() function.
|
Additional reference words: 3.00 VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |