Here's an example:

<CFQUERY NAME="GetYPs" DATASOURCE="#DSN#" USERNAME="#user#" PASSWORD="#pass#">
SELECT Class_ID, Class_Name, Pages, NewPages
FROM YellowPages (nolock)
</CFQUERY>

<CFSET STTEMP = STRUCTNEW()> <!--- temporary structure --->
<CFSET APPLICATION.YPS = STRUCTNEW()> <!--- final structure for Headings --->
<CFLOOP QUERY="GetYPs">
<CFSET STTEMP["Class_ID"] = "#Class_ID#">
<CFSET STTEMP["Class_Name"] = "#Class_Name#">
<CFSET STTEMP["Pages"] = "#Pages#">
<CFSET STTEMP["NewPages"] = "#NewPages#">
<CFSET APPLICATION.YPS[STTEMP["Class_ID"]] = STRUCTCOPY(STTEMP)>
<CFSET TMPVAR = STRUCTCLEAR(STTEMP)>
</CFLOOP>

best,  paul

At 10:45 AM 8/31/00 -0400, you wrote:
>         Is there a way to add multiple records into a structure or do I have
>to make an array of strucutres. Right now I made an aray of strucutures but
>I want to make sure that is the most logical way to be doing it.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to