You're trying to put a String value, namely Total_Hours, into an element in
the second dimension. Not sure why you need three dimensions, but either
drop to two and leave your code as it is, or place Total_Hours into the
array in the third dimension by specifying three indices. Eg <cfset
housTime[CR][1][1] = Total_Hours>

Hope that helps.

Ade
  -----Original Message-----
  From: Adam St. Pierre [mailto:[EMAIL PROTECTED]
  Sent: 13 April 2004 19:05
  To: CF-Newbie
  Subject: Array Population Error Message

  Greetings all!

  I'm having problems populating a 3 dimensional array with values from a
query.

  Here's the code:

  <cfquery name="getEmployeeHours" datasource="#DataSource#">
  Select *
  from Employee_Hours
  where
  Employee_ID = '001' AND
  Status = '0'
  </cfquery>

  <cfset hoursTime = arraynew(3)>

  <cfloop query="getEmployeeHours">
  <cfset hoursTime[CurrentRow] [1]= Total_Hours>
  <cfset hoursTime[CurrentRow] [2]= Total_Hours>
  <cfset hoursTime[CurrentRow] [3]= Total_Hours>
  </cfloop>

  I'm populating all elements of the array with one value for testing
purposes.

  And this is the error message I keep getting, no matter what values I try
to pull.

  "A scalar value of type java.lang.String cannot be assigned to a
2-dimensional ColdFusion array.

  A ColdFusion 2-dimensional array can only hold 1-dimensional ColdFusion
arrays and Java List objects.  "

  Anyone know what the hell this means?

  Thanks!

  - Adam
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to