Data source can be predefined/modified/deleted in AEM (refer to the section called “Data Source” in PowerServer Configuration Guide for .NET for details), or dynamically created/modified/deleted via appeondconfigdatasource object in Appeon Workarounds PBLs. But unlike creating data source in AEM, you could only dynamically create data source for the following database types: Microsoft SQL Server, Teradata, MySQL, SAP ASE, and PostgreSQL (data sources for Oracle, IBM Informix, and SAP SQL Anywhere cannot be created via appeondconfigdatasource object; they can only be created in AEM).
Note that you can only call appeondconfigdatasource object to dynamically create data source on the PowerServer for .NET version (not J2EE version).
Description
Create a data source with the specified parameters.
Syntax
of_adddatasource
( eon_str_connection
astr_connection
)
Argument |
Description |
---|---|
|
The parameters for the data source. Refer to eon_str_connection structure for the parameter list. |
Return value
Integer
0 - Success.
-1 - The parameters are incorrect. Failed to create the data source.
1 - The data source name already exists.
2 - The database type is not supported.
3 - The database connection failed.
Description
Delete the specified data source.
Syntax
of_deletedatasource
( string
as_datasourcename
) returns integer
Argument |
Description |
---|---|
|
The name of the data source to be deleted. |
Return value
Integer
0 - Success.
-1 - The parameters are incorrect. Failed to delete the data source.
1 - The data source name does not exist. Failed to delete the data source.
Description
Modify the parameters of the specified data source.
Syntax
of_editdatasource
(
eon_str_connection astr_connection
)
Argument |
Description |
---|---|
|
The parameters of the specified data source. Refer to eon_str_connection structure for the parameter list. |
Return value
Integer
0 - Success.
-1 - The parameters are incorrect. Failed to modify the data source.
1 - The data source name does not exist.
2 - The database type is not supported.
3 - The database connection failed.
Description
Struct.
The parameters of the data source to be created/modified.
Type |
Variable Name |
Description |
---|---|---|
string |
|
The database type of the data source. Supported values are: sqlserver, teradata, mysql, ase, postgresql, db2 |
string |
|
The name of the data source to be created/modified. |
string |
|
The machine name or IP address of the database server. |
string |
|
The port number of the database server. |
string |
|
The database name. |
string |
|
The user name of the database. |
string |
|
The password of the database. |
string |
|
The maximum number of connections PowerServer opens and pools on startup. |
string |
|
The minimum number of connections PowerServer opens and pools on startup. |
string |
|
Whether to use the connection pool. Supported values are: true, false. |
string |
|
The timeout period (in seconds) for the connection. |
string |
|
The timeout period (in seconds) for the commands. |
string |
|
Whether to enable dynamic database connection. Supported values are: true, false. |