SourceProfile.GetNames Method

Deprecated

Replaced by DatabaseName.GetNames

Returns the currently registered database names available for use in a program.

        [C#]
public static string[] GetNames(
bool publicDbs
);
        [Visual Basic] 
 public Shared GetName( _
   ByVal publicDbs As Boolean _
 ) As String()
      
        [Visual RPG]
 BegFunc GetNames Type(*String) Rank(1) Access(*Public) Shared(*Yes)
   DclSrParm publicDbs Type(*Boolean)
      
Parameters
publicDbs
The public database.
Returns

String. The currently registered database names available for use in a program.

Examples
        
          [C#]
        
  /* This code will fill a combo box with all of the available database
   * names. */
  foreach(string name in SourceProfile.GetNames(true)) /* Get *PUBLIC 
            databases. */
      cbDbName.Items.Add(name); /* NOTE: The names 
            appear without the "*PUBLIC/" prefix. */
  foreach(string name in SourceProfile.GetNames(false)) /* Get non public 
            databases. */
      cbDbName.Items.Add(name);
        
          [Visual Basic]
        
  ' This code will fill a combo box with all of the available database
  ' names.
  For Each name As String In SourceProfile.GetNames(True) ' Get *PUBLIC 
            databases.
      cbDbName.Items.Add(name) ' ' NOTE: The names 
            appear without the "*PUBLIC/" prefix.
  Next
  For Each name As String In SourceProfile.GetNames(False) ' Get non public 
            databases.
      cbDbName.Items.Add(name)
  Next
Requirements

Namespace: ASNA.DataGate.Providers

Assembly: ASNA DataGate Client

Platforms: Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows 7, Windows 8 Pro, Windows 8.1 Pro, Windows 10

See Also