I've gotten into the habit of always specifying the StringValue or TextValue
property with each statement. The UniObjects document states that the
StringValue property is the default property, but I've encountered this
issue too many times too feel comfortable not specifying the property.

10:   dArray.Value(1,1).StringValue = "Some String"
40:   dArray.Value(2,1).StringValue = CStr(50)

70:   dArray.Value(2,1).StringValue =
CStr(CInt(dArray.Value(2,1).StringValue) + 25)

90:   iNumber = CInt(dArray.Value(2,1).StringValue)

Hope this helps.

Regards, Ian Renfrew

----- Original Message ----- 
From: "Burwell, Edward" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 23, 2004 12:17 PM
Subject: [U2] [ud] UniObjects Dynamic Array Type Mismatch only in .exe


> Please give me your advice.  For example:
>
> ---------------------------------------------
>
> Dim iNumber as Integer
> Dim dArray As UniDynArray
> Set dArray = New UniDynArray
>
> 10:   dArray.Value(1,1) = "Some String"
> 40:   dArray.Value(2,1) = 50
>
> 70:   dArray.Value(2,1) = dArray.Value(2,1) + 25
>
> 90:   iNumber = dArray.Value(2,1)
>
> ----------------------------------------------
>
> This is a silly example, but it illustrates the problem that I am
> experiencing.  Then I run this in the design environment, it runs fine.
> When I create an .exe and run it, it bombs on line 90 with an Type
Mismatch
> error (error 13).
>
> What am I doing wrong?
> Has anyone else experienced this?
>
> UniData 5.2
> UniObjects 5.2
> VB 6.0 SP5
> uniobjects.dll (236KB) is version 3.1.3.1084  (product version 3.1.2) and
is
> dated 12/11/2001
>
> Thanks in advance.
>
> Ed Burwell
> [EMAIL PROTECTED]
> 973.361.5400 x1512
> -------
> u2-users mailing list
> [EMAIL PROTECTED]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to