KB-28134: Deleting records from a historic.

Question:

How can I delete records from a historic?

Solution:

To do so, use the ClearHistoricalData() function of the desired historic (via scripts).

If there is any object using the historic’s *.dat file (for example: a browser displaying its values), you must make sure this object’s file path is untied before  ClearHistoricalData() command is executed.

Example: the script below illustrates how to delete data from Hist1, whose values are displayed at the screen’s Browser1:

Browser1.Query.filename = “” // Loads an empty field into the browser’s query
Browser1.UpdateQuery() // Updates changes in the browser
Hist1.ClearHistoricalData() // Erases records from Hist1
Browser1.Consulta.filename = “D:\TEMP\hist.dat” // Loads the correct path for querying the browser
Browser1.UpdateQuery() // Updates changes in the browser
Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *