You could try this:
<body>
<H3>QueryAddRow Example</H3>

<!--- start by making a query --->
<cfquery name = "GetCourses" datasource = "cfsnippets">
SELECT Course_ID, Course_Num, Descript
FROM Courses
</cfquery>

<P>The Query "GetCourses" has <cfoutput>#GetCourses.RecordCount#
</cfoutput> rows.

<cfset CountVar = 0>
<CFLOOP CONDITION = "CountVar LT 15">
 <cfset temp = QueryAddRow(GetCourses)>
 <cfset CountVar = CountVar + 1>
 <cfset Temp = QuerySetCell(GetCourses, "Course_ID", CountVar)>
 <cfset CountVar = CountVar + 1>
 <cfset Temp = QuerySetCell(GetCourses, "Course_Num", 100*CountVar)>
 <cfset CountVar = CountVar + 1>
 <cfset Temp = QuerySetCell(GetCourses, "Descript",
 "Description of variable #Countvar#")>
</CFLOOP>
..
This is from help in CF 5.0 it is a way to add rows and cell data to a
query.  you could try that with a session.
----- Original Message -----
From: "Troy Simpson" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, January 14, 2002 6:04 PM
Subject: Re: Copy a Query into a Session Variable (o8i)


> David,
>
> Thanks.
> This may be what I need.
> But if I wanted to copy an existing query result set, how would I do that
> ?
>
> Troy
>
> David Brown wrote:
>
> > How about <cfquery name="session.qryResults" datasource="dsn">
> > </cfquery>
> >
> > -----Original Message-----
> > From: Troy Simpson [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, January 14, 2002 5:55 PM
> > To: CF-Talk
> > Subject: Copy a Query into a Session Variable (o8i)
> >
> > I want to query a database and store the result set in a Session
> > Variable for manipulation.  Then Update the database with the changes
> > when the user submits a save request.
> >
> > How do I make a copy of the query result set into a session variable?
> >
> > Is this a copy of qryResults or a pointer to qryResults.
> > <cfset session.results = qryResults>
> >
> > Thanks,
> > Troy
> > --
> > Troy Simpson | North Carolina State University
> > NCSU Libraries | Campus Box 7111 | Raleigh | North Carolina
> > ph.919.515.3855 | fax.919.513.3330
> >
> > It is better to be hated for what you are
> > than to be loved for what you are not.
> >   -- Andre Gide
> >
> >
> 
______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to