📚 SAP Business One SDK Help

GetCompanyList Method
See Also 

Description

Retrieves a list of the company databases located on the specified server.

Syntax

Visual Basic
Public Function GetCompanyList() As Recordset

Return Type

This method returns a Recordset object that contains a list of available companies on the server.

The list includes the following four fields:

  • dbName - represents the database name.
  • cmpName - represents the company name.
  • versStr - represents the version number of the company database.
  • dbUser - represents the database owner.

Remarks

This method is commonly used at start-up phase, when you are not sure which company databases exist on the server. Alternatively, you can use this method to allow users to choose the company database.

Before using this method, you must set the correct value to the Server property. If OpenID Connect (OIDC) is enabled, you also need to set the UserName and Password properties. Otherwise, the method returns an empty list.

After retrieving the company databases list, you can use the Connect method to set up a connection with a specific company database.

Example

See Also