BUG-0013588: Incompatible types when calling E3DataAccess’ GetValue/SetValue methods.

OVERVIEW

When using E3DataAccess component in typeless languages, such as VBScript or Javascript, GetValue method’s calls will return type mismatch errors. This happens because in typeless languages, the IN/OUT parameters’ types must be VARIANT. In VBA, for example, where all variables have defined types, this problem does not occur.

HOW CAN I REPRODUCE THIS PROBLEM?

For brevity purposes, we used Elipse E3 to reproduce this problem:

    Set da = CreateObject("E3DataAccess.E3DataAccessManager.1")
    Dim r, a, b, c
    r = da.GetValue("Data.Tag.Value", a, b, c)
    MsgBox r    

An error message is displayed: ‘Type mismatch: ‘da.GetValue”


WORKAROUND

  1. Use the control in a VBA environment.
  2. Update E3 or the E3DataAccess to versions 4.5 or higher.

SITUATION

Elipse Software has confirmed that this limitation has existed since the component (E3DataAccess) was created. The article Connecting an HTML page to an E3Server with communication library E3DataAccess using  JavaScript and VBScript contains the correction for versions 4.5 or higher.

Versions 4.5 or higher also feature two new methods: ReadValue and WriteValue. They replace GetValue and SetValue, which henceforth must be avoided.

THIS ARTICLE APPLIES TO THESE PRODUCTS

E3DataAccess version 4.5 or lower.

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 *