f2s_mssql_server_list_item_at¶
Applies to: MS SQL
Syntax
**There is no set_attribute. This attribute is read only.**
get_attribute f2s_mssql_server_list_item_at of {DriverID} {index} to {variable}
Parameter |
Description |
---|---|
DriverID |
The ID of the driver for which this applies. In most cases, you should use _f2s_ActiveDriverID. |
index |
Integer index of the server name to retrieve. The first server name begins at 1 (not 0) |
variable |
String Variable. Holds the server name |
Description
Getting this read only attribute returns the name of the MSSQL server specified by the index. The first server will be at index 1 NOT index 0.
When used with f2s_mssql_server_list_count, all the available server names can easily be retrieved.
Note: The SQL Server Browser service must be running for this attribute to return a valid value.
Examples
get_attribute
Integer iNumServers iIndex
String sServer
get_attribute f2s_mssql_server_list_count of _f2s_ActiveDriverID to iNumServers
Showln (SFormat("There are %1 MSSQL servers available.",iNumServers))
If (iNumServers>0) Begin
Showln "They are:"
For iIndex from 0 to (iNumServers-1)
get_attribute f2s_mssql_server_list_item_at of _f2s_ActiveDriverID (iIndex+1) to sServer
Showln sServer
Loop
End
Related Attributes
Replaces: Command GET_SQLSERVER_NAME