×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Attribute validation error for tag cfoutput

Attribute validation error for tag cfoutput

Attribute validation error for tag cfoutput

(OP)
am totally confused by this error... I keep getting the following error:

---------------------------------------------------------------------------------------------------------------
The value of the attribute query, which is currently "AppForm_IntMajAA_Selected", is invalid.
.....
.....
.....
<cfoutput query="AppForm_IntMajAA_Selected"><OPTION VALUE="#AppFormDegMaj_AACode#" SELECTED>#AppFormDegMaj_ID#</option>
<input type="hidden" name="AppForm_IntMajPick" value="#AppFormDegMaj_ID#">
<input type="hidden" name="AppForm_IntMajName" value="#AppFormDegMaj_ID#"></cfoutput>
---------------------------------------------------------------------------------------------------------------------------

I am totally confused as the variable match the appropriate field names, I actually cut and pasted the field names so I know the field names are correct....!


The code for the query is:

<cfif Compare(Trim(form.AppForm_IntMajAA),"0") EQ 0>
<CFQUERY NAME="AppForm_IntMajAA_Selected" DATASOURCE="ProsFormTest">
SELECT *
FROM AppForm_DegMajList
WHERE AppFormDegMaj_AACode LIKE '#form.AppForm_IntMajAA#'
</CFQUERY>
</cfif>
---------------------------------------------------------------------------------------------------------

I am using CFMX with an Access 2000 database.

Please advise on where I might be screwing up in my logic - thanks!

RE: Attribute validation error for tag cfoutput

what happens on you page if the if statement:

<cfif Compare(Trim(form.AppForm_IntMajAA),"0") EQ 0>

doesn't match?

at the moment you are only running the query when there is a match on the if statement.  i think the error is because, there is no query for CF to run because the 'form.AppForm_IntMajAA' does not equal 0.

try putting an else statement in, something like this will do for now:

<cfif Compare(Trim(form.AppForm_IntMajAA),"0") EQ 0>
<CFQUERY NAME="AppForm_IntMajAA_Selected" DATASOURCE="ProsFormTest">
SELECT *
FROM AppForm_DegMajList
WHERE AppFormDegMaj_AACode LIKE '#form.AppForm_IntMajAA#'
</CFQUERY>
<CFELSE>
  I'm not running the query

</cfif>

hope this helps!

Tony

RE: Attribute validation error for tag cfoutput

(OP)
Interesting point..

I have a CFIF that should avoid <cfoutput query="AppForm_IntMajAA_Selected"> if nothing is selected. I get the error when an option is selected and the code is run.

It is obvious that I something in my logic is in error - so I will review all of code and get back shortly...

Thanks for your input..

RE: Attribute validation error for tag cfoutput

(OP)
Quick Update:

I think I figured it out - I had my CFIF flow pointing in the wrong direction!

I had "EQ 0" when it should have been "NEQ 0" - Duuh!

Thanks for helping me out in the right direction...

#dss#

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close