Class: DatasourceConnectionInfo

SuperMap.DatasourceConnectionInfo

The DatasourceConnectionInfo class. This class includes all information needed for datasource connection, such as server name, user name, password, etc. While saving workspace, the datasource connection information will be saved into the workspace file. For different types of datasources, the connection information is different. Therefore, please take care of the suitable datasource type for the member while using members included in the class. For data connection information returned from the datasource object, only the connect method can be modified. For datasource connection information object, all content can be modified.

new SuperMap.DatasourceConnectionInfo(options)

DatasourceConnectionInfo.js, line 5
Name Type Description
options Object

The optional parameters.

Name Type Description
alias string

The alias of the datasource.

dataBase string

The name of the database which is connected by the datasource.

connect boolean optional

Whether the datasource automatically connects to the data.

driver string optional

The driver program name of the database using ODBC (Open Database Connectivity).

engineType SuperMap.EngineType optional

The engine type which is connected to the datasource.

exclusive boolean optional

Whether to open the datasource exclusively.

OpenLinkTable boolean optional

Whether to open other non-SuperMap data tables in the database as LinkTable.

password string optional

The login password of a database or a file which is connected to the datasource

readOnly boolean optional

Whether the datasource should be opened as read-only.

server string optional

Database server name, file name or service URL.

user string optional

The login user name of the database.

Members

aliasstring

The alias of the datasource.

connectboolean

Whether the datasource automatically connects to the data.

dataBasestring

The name of the database which is connected by the datasource.

driverstring

he driver program name of the database using ODBC (Open Database Connectivity). For SQL Server database and the WMTS service published by iServer, the parameter is required. For SQL Server database, it uses ODBC for connection, and the driver program name for it is “SQL Server” or “SQL Native Client”; for WMTS service published by iServer, the driver program name is “WMTS”.

The engine type which is connected to the datasource.

exclusiveboolean

Whether to open the datasource exclusively.

OpenLinkTableboolean

Whether to open other non-SuperMap data tables in the database as LinkTable.

passwordstring

The login password of a database or a file which is connected to the datasource.

readOnlyboolean

Whether the datasource should be opened as read-only.

serverstring

Database server name, file name or service URL.

  1. Absolute path for SDB or UDB files. Note: When length of the absolute path exceeds the 260 bytes of UTF-8 encoding, the datasource will not be able to open.
  2. For the Oracle database, server name is the TNS service name.
  3. For SQL Server database, server name is its system DSN (Database Source Name) name.
  4. For PostgreSQL database, server name is “IP:port number”, the default port number is 5432.
  5. For DB2 database, it has been cataloged, therefore, server setting is not needed.
  6. For Kingbase database, server name is its IP address.
  7. For GoogleMaps datasource, it is server address is http://maps.google.com by default and not editable.
  8. For SuperMapCould datasource, it is the service address.
  9. For MAPWORLD datasource, it is the service address. The default setting is href="http://www.tianditu.cn">www.tianditu.cn} and not editable.
  10. For OGC and REST datasources, it is the service address.

userstring

The login user name of the database.

Methods

destroy()

DatasourceConnectionInfo.js, line 117

Disposes the resource. The property that references resource is set to null.