SetDataSourceParam

Definition:

SetDataSourceParam(datasource, paramname, paramvalue)

 

Description:

Change the connection string for a Data Source.

 

Platforms:

All

 

Parameters:

datasource - required

Specifies the Data Source to be acted on – click here for the format of this parameter.

 

paramname - required

String containing the name of the connection string parameter whose value you want to set.

Can have one of the following values:

"Username" - Username to be used to connect to the Target data source.

"Password" - Password to be used to connect to the Target data source.

"URL" - URL of a Web API or Web Service data source.

"Transaction" - Name of the Web Site Transaction to be used when connecting to an awi Web Service data source.

"ConnectionString" or "Connection" - Connection string when connecting to an ADO data source.

"Timeout" - Number of seconds the Digitise Apps Client will wait for data to start being downloaded when a data download is requested at runtime.

"Table" - The name of the remote database table when connecting to an ADO data source.

 

paramvalue - required

Value to set into the Parameter specified by paramname.

 

Returns:

nothing

 

Notes:

  • This Method, in conjunction with the ClearDataSourceParams and GetDataSourceParam Methods, allows you, from within your Script, to override the default connection string for the specified Data Source. You will need to call this Method for each parameter you want to set but you only need to set those parameters you require. Any parameters not set will use the original values specified when the Data Source was defined during development of the Solution.

    • You can also change these connection values on the App Server using the App Manager utility, allowing you to easily modify the connection details without having to change your app.
  • With Web API data sources, "URL" is the only parameter you can change.

  • This Method is not relevant for use with Custom Views.


See also:

GetDataSourceParam

ClearDataSourceParams

Synchronise

IsDataSourceLocked