EnumRegisteredDSNs

Returns an array of the registered Data Source Names on the application server.

Note:

EnumRegisteredDSNs applies to the Data Source Names registered with Financial Management Server Administrator, not to ODBC Data Source Names.

Syntax

<HsxServer>.EnumRegisteredDSNs()

Return Value

Variant array. Returns the names of the registered Data Source Names. The array is returned as a String subtype.

Example

This example tests whether the application server has a registered Data Source Name. The example applies UBound to the array returned by EnumRegisteredDSNs. If UBound returns 0 there is not a registered Data Source Name; in this case the user is warned and the procedure is terminated.

Dim vaDSNs, iDsnCount As Integer
vaDSNs = m_cHsxServer.EnumRegisteredDSNs()
If UBound(vaDSNs) = 0 Then
  MsgBox "There is no DSN for the application server." & vbCr _ 
  & "Register a DSN before proceeding."
  Exit Sub
End If