# Upgrade to EntireX Version 8 causes Error

**URL:** <https://techcommunity.softwareag.com/t/upgrade-to-entirex-version-8-causes-error/99498>\
**Category:** Forum\
**Tags:** Mainframe-Integration, EntireX\
**Created:** [January 16, 2012, 3:49pm UTC](https://techcommunity.softwareag.com/t/upgrade-to-entirex-version-8-causes-error/99498 "2012-01-16T15:49:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![YUBEN1](https://avatars.discourse-cdn.com/v4/letter/y/eada6e/32.png) [@YUBEN1](https://techcommunity.softwareag.com/u/YUBEN1)\
**Post date:** [January 16, 2012, 3:49pm UTC](https://techcommunity.softwareag.com/t/upgrade-to-entirex-version-8-causes-error/99498/1 "2012-01-16T15:49:49Z")

</div>

I used to be able to call a version 7.3.3 EntireX workbench generated dll from VB6 (DCOM). After generating the dll using EntireX version 8, I am unable to call the generated dll from VB6. The error I get is:

> [@](#):
>
> Error: 1006 0058 Conversion from Alpha to Numeric failed

This error is being caused by a parameter being defined as a string in VB6 and an N3 in the IDL from which the EntireX dll was generated. I am passing an empty string to the EntireX dll. When I pass a “0” instead of an empty string, there is no error. Note again, that this was not the case in version 7. The problem is that I have a few hundred dll’s where this might be a problem so changing my VB6 code is impractical. Is there a switch or setting available that will mimic the version 7 behaviour in version 8?

---

<div class="post-metadata">

**Author:** ![Shmuel\_Coller](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/shmuel_coller/32/370_2.png) [@Shmuel\_Coller](https://techcommunity.softwareag.com/u/Shmuel_Coller)\
**Post date:** [January 16, 2012, 4:03pm UTC](https://techcommunity.softwareag.com/t/upgrade-to-entirex-version-8-causes-error/99498/2 "2012-01-16T16:03:59Z")

</div>

Did you rule out the Microsoft runtime being the source of the problem? see this for example:  
[url][c# - Convert String to Decimal Mystery - Stack Overflow](http://stackoverflow.com/questions/6499003/c-sharp-net-convert-string-to-decimal-mystery%5B/url%5D)  
Can you attach the VB source snippet and IDL?  
Shmuel Coller

---

<div class="post-metadata">

**Author:** ![YUBEN1](https://avatars.discourse-cdn.com/v4/letter/y/eada6e/32.png) [@YUBEN1](https://techcommunity.softwareag.com/u/YUBEN1)\
**Post date:** [January 17, 2012, 9:06am UTC](https://techcommunity.softwareag.com/t/upgrade-to-entirex-version-8-causes-error/99498/3 "2012-01-17T09:06:11Z")

</div>

I dont think that the link provided is relevant to my issue because I am using VB 6 and this is not an issue with EntireX v7. The IDL is :

```auto
library 'Global':'Bracweb' is

program 'BPE001N1':'StdCodesEnq' is define data parameter
   	1 IP-USER-ID (A6)
   	1 IP-RESOURCE-ID (A6)
   	1 IP-FORM-NAME (A8)
   	1 IP-ACTION (A1)
   	1 IOP-SCROLL-DIR (A1)
   	1 IOP-BOF (A1)
   	1 IOP-EOF (A1)
   	1 IOP-OCCURS (N3)
   	1 IOP-CODE-TYPE (A8)
   	1 IOP-DISP-ORDER	(N3)
   	1 IOP-DESC (A32)
   	1 IOP-CODE (A8)
   	1 OP-CODE-TYPE (A8/50) In Out
   	1 OP-RESOURCE-ID	(A6/50)
   	1 OP-DISP-ORDER (N3/50)
   	1 OP-DESC (A32/50)
   	1 OP-CODE (A8/50)
   	1 OP-DEFAULT (A1/50)
   	1 OP-ORIGINAL-CODE (A8/50)
	1 OP-FIELD1 (A50/50)
	1 OP-FIELD2 (A50/50)
	1 OP-FIELD3 (A50/50)
	1 OP-FIELD4 (A50/50)
	1 OP-FIELD5 (A50/50)
   	1 ERR-TYPE (A1/5) 	
   	1 ERR-MESSAGE (A150/5) 	
   	1 ERR-TAB (N2/5) 	
   	1 ERR-PROGRAM (A8/5) 
   	1 ERR-FIELD (A20/5) 	
end-define
```

and the VB 6 code is:

```auto
Public Sub getCodes(Optional ipUserID As String = "", Optional ipResourceID As String = "", _
 Optional ipFormName As String = "BPE001N1", Optional ipAction As String = "", _
 Optional iopScrollDir As String = "", Optional iopBof As String = "", _
 Optional iopEOF As String = "", Optional iopOccurs As String = "", _
 Optional iopCodeType As String = "")
   
   Dim xmlNode As MSXML2.IXMLDOMElement
   Dim xmlAttrib As MSXML2.IXMLDOMAttribute
   
   Dim codetypeIN As String * 8
   Dim iopDispOrder As String
   Dim iopDesc As String * 32
   Dim IOPCODE As String * 8
   Dim OPEOF As String
   Dim opCodeType() As String
   Dim OPRESOURCEID() As String
   Dim opDispOrder() As String
   Dim OPDESC() As String
   Dim OPCODE() As String
   Dim opDefault() As String
   Dim OPORIGINALCODE() As String
   Dim opField1() As String
   Dim opField2() As String
   Dim opField3() As String
   Dim opField4() As String
   Dim opField5() As String
   'Errors
   Dim opErrorType() As String
   Dim opErrorMessage() As String
   Dim opErrorProgram() As String
   Dim opErrorField() As String
   Dim outDoc As MSXML2.DOMDocument40
   Dim menuObj As MSXML2.DOMDocument40
   Dim outXml As String
   'On Error GoTo errorHandle:
   Dim xmlGlobalNode As MSXML2.IXMLDOMElement
   Dim xmlDatNode As MSXML2.IXMLDOMElement
   Dim n As Long
   Dim oldType As String
     
   Set xmlNode = mvarXmlDom.selectSingleNode("//GLOBALS")
   codetypeIN = iopCodeType
     
   ReDim opCodeType(49) As String
   ReDim OPRESOURCEID(49) As String
   ReDim opDispOrder(49) As String
   ReDim OPDESC(49) As String
   ReDim OPCODE(49) As String
   ReDim opDefault(49) As String
   ReDim OPORIGINALCODE(49) As String
   'Errors.
   ReDim opErrorType(4) As String
   ReDim opErrorMessage(4) As String
   ReDim opErrorTab(4) As String
   ReDim opErrorProgram(4) As String
   ReDim opErrorField(4) As String
   ipUserID = ""
   ipResourceID = ""
   ipAction = ""
        
   mvarExObj.ServerAddress = commonXml.ConnectString("ENTXBRAC")
     
    
   mvarExObj.StdCodesEnq ipUserID, ipResourceID, ipFormName, ipAction, _
                         iopScrollDir, iopBof, iopEOF, iopOccurs, _
                         codetypeIN, iopDispOrder, iopDesc, IOPCODE, _
                         opCodeType, OPRESOURCEID, opDispOrder, _
                         OPDESC, OPCODE, opDefault, OPORIGINALCODE, _
                         opField1, opField2, opField3, opField4, opField5, _
                         opErrorType, opErrorMessage, opErrorTab, _
                         opErrorProgram, opErrorField
                            
End Sub
```

The line that causes the error is ‘mvarExObj.StdCodesEnq …’. This is the call to the EntireX generated dll. When the iopOccurs and iopDispOrder variables are changed from “” to “0”, the problem is resolved. Note that both these variables are defined as strings in VB 6 and that the IDL defines them as N3. Again, this works in EntireX version 7. So the problem seems to be that EntireX v8 does not tolerate blank strings for numeric variables.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:01pm UTC](https://techcommunity.softwareag.com/t/upgrade-to-entirex-version-8-causes-error/99498/4 "2021-04-02T15:01:27Z")

</div>


