powered by CADENAS

Manual

Manual

1.10.2.1.3. Execute script

For complex installations with several users and ERP integration a daily automated update of the pre-calculation file is recommended.

To this use the script under %CADENAS_SETUP%/scripts/common/pcon_update.vbb.

[Note] Note

Notes on use can be detected via command line:

"%cadenas%\bin\x86\32\cscripthost.exe" "%cadenas_setup%\scripts\common\pcon_update.vbb" -?

The necessary process can be executed on every server, which is capable to run PARTsolutions, by starting a scheduled task with the following command line (recommendation once a day, at one o'clock in the morning). The combination of the scripts for nightly update nightupdate.vbb (compare Section 4.14.3.3, “Automated and cyclical update of data ”) and connections pre-calculation file makes sense.

Rem First nightly update

"%cadenas%\bin\x86\32\cscripthost.exe" "%cadenas_setup%\scripts\erp\nightupdate.vbb" -user

Rem Afterwards connections pre-calculation file (*.sf)

"%cadenas%\bin\x86\32\cscripthost.exe" "%cadenas_setup%\scripts\common\pcon_update.vbb" -user *

Thereby, at the latest one working day after the assignment, the display (especially colors) in PARTdataManager, in the dialog area Connection is adjusted. A detailed description with examples is found under Section 3.1.12.5.1, “Create and edit ERP connections ” in PARTsolutions / PARTcommunity4Enterprise - User manual.

[Note] Note

The script pcon_update.vbb only accesses the pre-calculation file.

In the following the needed call parameters are explained (with examples).

-user

Define a user name, which shall be used for the database login.

[Note] Note

If there is an automated login for the respective user, then in this case the stating of -user is sufficient. (stating of "-pwd" and "-group" can be omitted.)

On this compare Section 4.24.3.3, “ Enable automatic login ”.

-pwd Define the user password for the database login.
-group Define the user group (role).

Options:

-i

Ignore an active database login. The database login data or an automated database login are needed - if this option is set.

Using this option is possibly more secure due to questions of access rights.

-e

Force ERP information. The script is cancelled, if none or incomplete ERP information is accessible.

[Note] Note

Possibly the ERP information cannot be read in completely due to missing access rights or a failed database login.

If the reading in of the ERP information is absolutely essential, then the use of this parameter makes sense. Thus reading in of incomplete information is prevented. In the command line a respective message will be displayed in case of abort.

-n

Don't force ERP information.

[Note] Note

If the ERP integration is not used for connections, then using this parameter makes sense. (The time exposure for reading in ERP information is saved.)

Examples:

  • Update of the pre-calculation file with ERP information.

    Use active database login or manually log in with the stated data.

    CSCRIPTHOST.EXE PCON_UPDATE.VB -user erpuser -pwd erpuser -group admin

  • Update of the pre-calculation file with ERP information.

    Use active database login or log in with the stated user.

    If only "-user" is stated, then there has to be configured an automated login for the stated user!

    CSCRIPTHOST.EXE PCON_UPDATE.VB -user erpuser

  • Update of the pre-calculation file with ERP information.

    Ignore active database login and instead manually log in with an automated login.

    [Note] Note

    In this case a global user (Wildcard '*') has to be created and there has to be an open connection.

    CSCRIPTHOST.EXE PCON_UPDATE.VB -i