Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

array boundary exceeded

1,579 views
Skip to first unread message

Connie Wang

unread,
Jan 14, 2002, 3:36:08 PM1/14/02
to
How much records can an unbounded string array handle in PowerBuilder?

I use an unbounded String array in my code. Normally, It works fine, but I got
this "array boundary exceeded" error when the code put big amount of data (like
40,000) to this array? So I'd like to know how much data PowerBuilder Array can
handle.


Thanks very much.

Connie
---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp

Chris Keating

unread,
Jan 14, 2002, 4:45:14 PM1/14/02
to
It think you mean the string is unlimited. The array dimension is limited.

/ck

"Bug" <fent...@hotmail.com> wrote in message
news:3XV5QJU...@forums.sybase.com...
> Theoretically, it's only limited to the amount of memory available on your
> machine. Are you, perhaps, using an INT variable as your index? Once an
INT
> passes 32,767 it flops back to -32,768 and would give you this error. Try
a
> LONG variable instead.
>
> HTH
>
>
> "Connie Wang" <conni...@cingular.com> wrote in message
> news:Aea7YsT...@forums.sybase.com...

Chris Keating

unread,
Jan 14, 2002, 4:25:44 PM1/14/02
to
Please do not crosspost.

From the PB* documentation: Each dimension of an array can have
2,147,483,647 bytes of elements.

How are you populating this array. There is a limit when working with dw
where you can only manipulate 32k elements but I think you get a different
error.


/ck

"Connie Wang" <conni...@cingular.com> wrote in message
news:Aea7YsT...@forums.sybase.com...

Bug

unread,
Jan 14, 2002, 4:22:46 PM1/14/02
to
Theoretically, it's only limited to the amount of memory available on your
machine. Are you, perhaps, using an INT variable as your index? Once an INT
passes 32,767 it flops back to -32,768 and would give you this error. Try a
LONG variable instead.

HTH


"Connie Wang" <conni...@cingular.com> wrote in message
news:Aea7YsT...@forums.sybase.com...

Edward Muesch

unread,
Jan 14, 2002, 4:40:10 PM1/14/02
to
Actually, different PB versions have had different limitations on array
sizes. PB 6.5, for instance, has a limit of 2,147,483,647 elements per
dimension. In practice it would be hard to exceed this limitation with
40,000 rows even if a single dimension was used with each column having it's
own element and using an "offset" to locate specific rows. So, Bug's theory
is a lot more plausible then actually exceeding PB's limitations.

It is an "unbounded" array isn't it?

HTH

-EGM

Bug <fent...@hotmail.com> wrote in message
news:3XV5QJU...@forums.sybase.com...

Bug

unread,
Jan 14, 2002, 6:08:37 PM1/14/02
to
What I meant isn't correct. As you said, there IS a limit to the number of
elements, though I didn't know that this morning. Regardless, if the index
is a 16-bit integer variable, you will get problems at the 32,768th element.
And you can avoid this by using a 32-bit integer variable (a Long) to index
your array.

"Chris Keating" <nospam_...@iAnywhere.com> wrote in message
news:g1kA1VU...@forums.sybase.com...

Terry Voth

unread,
Jan 15, 2002, 7:32:51 AM1/15/02
to
Whenever I run into this, it's usually a backhanded way of
PowerBuilder telling me it's run out of memory, so it can't allocate
any more array elements.

Maybe a work around (a good day for suggesting this <g>) is to use an
external datawindow, and set the datawindow to store data to disk (you
don't mention version, but there was a bug that storage to disk didn't
work in early PB6 versions). May be a little slower... then again, it
may be faster than the stopped version <g>. The catch is that you'll
have to define the maximum size of your string.

Good luck,

Terry [TeamSybase] and Sequel the techno-kitten

On Mon, 14 Jan 2002 15:36:08 -0500, "Connie Wang"
<conni...@cingular.com> wrote:

>How much records can an unbounded string array handle in PowerBuilder?
>
>I use an unbounded String array in my code. Normally, It works fine, but I got
>this "array boundary exceeded" error when the code put big amount of data (like
>40,000) to this array? So I'd like to know how much data PowerBuilder Array can
>handle.

Sequel's Sandbox: http://www.techno-kitten.com
Home of PBL Peeper, a PowerBuilder Developer's Toolkit.
Version 2.1.01 now available at the Sandbox
^ ^
o o
=*=

0 new messages