SQLGETPROP( ) Function Example
The following example uses SQLCONNECT( ) to display the connection dialog box. Choose a datasource and the example will display the results using SQLGETPROP( ) with the DataSource cSetting.
* Clear environment
CLOSE ALL
CLEAR ALL
CLEAR
* Display the Select Connection or Data Source dialog box
* to choose a connection
nHandle=SQLCONNECT()
* Test connection, report results
IF nHandle > 0
cSource= SQLGETPROP(nHandle, "datasource")
=MESSAGEBOX("Current Data Source = "+cSource,0,"Connection Results")
ELSE
=MESSAGEBOX("Connection Error = " + ;
ALLTRIM(STR(nHandle)),0,"Connection Results")
ENDIF
=SQLDISCONNECT(nHandle)