« Return to Thread: [ANN] 4D Summit in 3 Weeks/4D v11 SQL Briefing/Tech Note/Tech Tips

Re: Select To Array problem

by Tom Dillon-2 :: Rate this Message:

Reply to Author | View in Thread

Bonita Oliver sez:

>Here is my line of code.....
>
>SELECTION TO
>ARRAY([Contacts]FullName;Name;[Contacts]Phone;Phone;[Contacts]Email;Emai
>l;[OrgInfo]Code;Code;[Contacts]CivilServant;CS;[Contacts]Date_Last_Surve
>yed;LastSurveyDate)
>
>I am getting an error stating "Changing the number of dimensions in an
>array".  What does this mean?

Like Bill Leddy said, it's probably a two dimensional array. A fast way
to determine which variable is the culprit would be to put a TRACE or
break point at the Selection to Array and look at the variables to see
what they're defined as.

If this code is in a [Contacts] form, and you're using the same name for
some fields and variables, 4D may be interpreting them as fields. For
instance, Phone, may be interpreted as [Contacts]Phone, which would
cause a problem. I seem to remember that this only occurs if you use the
Default Table command, but I'm not sure.

You might want to weigh the possibility of looking into the idea of
considering a better variable naming convention that would allow you to
tell the difference in fields, single variables and arrays. Check out
some of the discussions on GMane: <http://search.gmane.org/?
query=variable+naming+convention&group=gmane.comp.lang.inug-4d.tech>

--
   ------------------------------------------------------------------
   Tom Dillon                                        900 S. Coors Dr.
   DataCraft                                       Lakewood, CO 80228
   TomDillon@...                           720/962-4880
   ------------------------------------------------------------------
          The butterfly will only land on you after you stop
          grabbing for it. --- Sunastar
   ------------------------------------------------------------------



**********************************************************************
4D Basics hosted by 4D, Inc.                       http://www.4D.com/

Did you know?  The 4D Partner Program now gives you
access to Hotfix releases as soon as they are available!
To learn more, go to http://www.4D.com/support/partner.html

To Unsubscribe:                        mailto:4DBasics-off@...
**********************************************************************


 « Return to Thread: [ANN] 4D Summit in 3 Weeks/4D v11 SQL Briefing/Tech Note/Tech Tips