• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 501
  • Last Modified:

Accessing CFQUERY results attribute on subsequent pages.

I am using Dreamweaver / CF8. I am INSERTING a new entry into a database. I am successful, and I am getting a cfdump of the userID via

<cfdump var="#result.IDENTITYCOL#" />

BUT NOW HOW DO I PASS the value of result.IDENTITYCOL to the next page?

I want to use it as part of my SQL query to pull the record up using the userID.

I tried setting result.IDENTITYCOL  as a session variable, but apparently I'm doing it wrong, because it is giving me error messages.

your help is greatly appreciated.
  • 2
1 Solution
Depends how you are navigating to the next page.

You can put it in the url or a session variable.

Normally the url

TomEnokRAuthor Commented:
How do I set it up as a session variable?

on my second page, i did this:

<cfset Session.sessUserID = #result.IDENTITYCOL#>

Then I tried to access sessionUserID in a form, and it says that result.IDENTITYCOL is undefined.

TomEnokRAuthor Commented:
Okay..I got it working via the URL. my problem was that I moving to the second form on submit...rather than after insertion.... so it was causing me to pass a null variable, as it was not yet defined. All is well. Your URL solution works.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now