TomEnokR
asked on
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.
<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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
ASKER
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.