TN AppSvr187 How to obtain galaxy version information from within a Wonderware Application Server galaxy
Description
This article from InSource shows how to connect to a Wonderware galaxy database and obtain the galaxy version information.
This article from InSource shows how to connect to a Wonderware galaxy database and obtain the galaxy version information.
- Author: Joseph Hefner
- Published: 3/3/2016
- Applies to: Application Server 2014 R2 and later.
Details
In the steps below, I will walk through setting up the SQL Data object to make a connection into the galaxy database and acquire the version information.
Step 1) Right click the $SQLData template under the Application section of the Template toolbox and choose New \ Instance.
Step 2) Double click the Database tab and setup the Database Server information: In the example below, "Joesp2k14r2" is the name of the GR computer and "test2" is the name of the galaxy.
Step 3) Create a new attribute of type string to hold the version information and assign it to an initial value of "not assigned". For earlier versions of application server, this would either be a "Field Attribute" or "UDA".
Step 4) Under the Design tab, assign the newly created attribute to the "version_string" field and set the Identity column Name to "version_number".
Step 5) Under the scripts tab, create a new script to initialize the temp database to the first record in the table.
Step 6) Create a second script to write the data from the temp database into the assigned attribute.
Step 7) Save the object and check it in and then move it to the desired location and deploy it by right clicking the object and choosing "Deploy":
Step 8) Confirm the version shows up as desired in the Object Viewer watch list as below: