Example of Access to a SQL Server

<< Click to Display Table of Contents >>

 

Example of Access to a SQL Server

To illustrate access to SQL Server, let's create a Historic recording data with a scan time of one second. These procedures are shown next.

1.Create a Demo Tag. This Tag's settings do not need to be changed.

2.Double-click the Database object to open SQL Server's setup window. These parameters must be changed to match the available settings during SQL Server's installation.

3.Perform all configurations needed on this window, such as server's name, user, password, and database.

4.After executing this configuration, configure the Historic object to access this database. To do so, create a Field in the Historic and insert the Demo Tag created previously, which is used to send different values to the database.

A Historic object and its settings

A Historic object and its settings

5.Open the Properties Windows of this Historic and specify both a database server and a table name. Other settings must remain unchanged. This table retrieves data from Elipse E3 and also views SQL Server Management Studio usage, which is a client used for queries to a SQL Server.

6.Once Historic is configured, users must create a table structure in the database server. To do so, click Create DB Structure Create DB Structure. A message confirming the creation of this table structure is displayed. In case of any error, users must locate the problem.

7.To view this Historic in action, saving data to a SQL Server, create a Screen, insert an E3Browser, and configure it to access the database server, as previously explained in the Historic, and configure this E3Browser to be automatically updated every 10 seconds, for example.

8.After these configurations, execute the project. After some time, the E3Browser starts displaying data sent to this server.

9.Users can consolidate data to display in Elipse E3 and stored in the server by using an E3Browser's Query object and SQL Server Management Studio. To do so, create different queries on the database and edit them both in the Query object and in SQL Server Management Studio. These results must be the same if the Domain is stopped, or similar if the Domain is executing. This difference is due to constant database updates when a Domain is executing. To edit queries in a Query object, enable the Enable SQL customization option on the SQL tab.

Was this page useful?