RE: [U2] [ud] UniObjects Dynamic Array Type Mismatch only in .ex e

2004-08-24 Thread Burwell, Edward
Jef,

Thanks!  That worked, however, the size of the .exe went from 28K to 16K
when I compiled to P-Code.  Does this mean the app will run slower?  Faster?
The Same?

Thanks

Ed

-Original Message-
From: Jef Lee [mailto:[EMAIL PROTECTED]
Sent: Monday, August 23, 2004 9:30 PM
To: [EMAIL PROTECTED]
Subject: RE: [U2] [ud] UniObjects Dynamic Array Type Mismatch only in
.exe


You may be experiencing a problem we had with VB6 in the executable.
Try setting your project compilation to P-code.  It makes a difference
to the way the values are assigned to the dynamic arrays.

Jef...
IT Vision
Level 3 Kirin Centre, 15 Ogilvie Road, APPLECROSS, WA 6153
Tel: (08) 9315 7000  Fax: (08) 9315 7088
P O Box 881, Canning Bridge, WA 6153
A.C.N. 068 914 867
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Burwell, Edward
Sent: Tuesday, August 24, 2004 2:32 AM
To: '[EMAIL PROTECTED]'
Subject: RE: [U2] [ud] UniObjects Dynamic Array Type Mismatch only in
.exe

The issue is why does it work fine in design mode and blow up when it's
an executable?  

It looks like the + sign is acting like a plus sign in design mode, but
acting like an ampersand ( string-concatenation) when run as an .exe.

-Original Message-
From: Adrian Matthews [mailto:[EMAIL PROTECTED]
Sent: Monday, August 23, 2004 1:23 PM
To: [EMAIL PROTECTED]
Subject: RE: [U2] [ud] UniObjects Dynamic Array Type Mismatch only in
.exe


Have you tried a CInt around the dArray.Value(2,1). I'm guessing that
the dynamic array object stores everything as strings or variants.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Burwell, Edward
Sent: 23 August 2004 17:18
To: '[EMAIL PROTECTED]'
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/


The information contained in this email is strictly confidential and for
the use of the addressee only, unless otherwise indicated. If you are
not the intended recipient, please do not read, copy, use or disclose to
others this message or any attachment. Please also notify the sender by
replying to this email or by telephone +44 (0)20 7896 0011 and then
delete the email and any copies of it. Opinions, conclusions (etc.) that
do not relate to the official business of this company shall be
understood as neither given nor endorsed by it.  IG Markets Limited and
IG Index Plc are authorised and regulated by the Financial Services
Authority and, in Australia, by the Australian Securities and
Investments Commission.
---
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/
---
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/


RE: [U2] [ud] UniObjects Dynamic Array Type Mismatch only in .ex e

2004-08-24 Thread Jef Lee
I don't think ours suffered from speed issues.  It was so long ago and
we did what we had to to keep the project alive.  The problem you had
arises from accessing a dynamic array value more than once in a
statement.  If you are in your application's infancy, you can use local
variable.  Instead of:

dynarray1.value(1,1) = dynarray1.value(1,1) +
dynarray2.value(1,3)
use:
var1 = dynarray1.value(1,1)
var2 = dynarray2.value(1,3)
dynarray1.value(1,1) = var1 + var2

Then you can keep the non-pcode version and control of the compilation
optimisation.

Jef...
IT Vision
Level 3 Kirin Centre, 15 Ogilvie Road, APPLECROSS, WA 6153
Tel: (08) 9315 7000  Fax: (08) 9315 7088
P O Box 881, Canning Bridge, WA 6153
A.C.N. 068 914 867
---
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/