EasyCFM.COM ColdFusion Forums / MS Access Related Issues / Adding columns makes code fail, why?

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: Adding columns makes code fail, why?

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

MIGhunter
04-15-2007 @ 2:40 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 570
Joined: Apr 2006

Ok, I wrote some code for a master detail page.  Then I added some columns to the access file.  I added them to the select statement and I added them to the table.  However, when I execute the page, I get VARIABLE email is not defined.  

If I comment them out, it works fine but not when in normal mode.  Any suggestions on what it could be?

Scarecrow
01-07-2009 @ 6:25 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Junior Member
Posts: 109
Joined: Oct 2004

probably because email is a reserved word.

Either change the name or enclose in []

Ken

www.scarecrowapplications.com

weathermanfsu
06-09-2009 @ 12:22 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 183
Joined: Apr 2004

it says variable email is not defined, this indicates a problem with the output to the screen, not with the database query.

When you spit out variable to the screen inside the cfoutput, make sure you qualify it, meaning preface it with a scope.  In your case, your query (since that is where you are getting the information...)

<cfquery name="myquery"...>
selected email from blah blah....
</cfquery>

<cfoutput>
#myquery.email#
</cfoutput>

If you are every displaying information that the user submitted from a form, then it would be form.email....

I hope that makes sense.  Basically it did not know where to go and get the data for the email field to show the user.

Webmaster
06-09-2009 @ 2:05 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4542
Joined: Jan 2002

can we see your code?

Pablo Varando
Senior Application Architect
EasyCFM.COM, LLC.

904.483.1457 \\ mobile
webmaster@easycfm.com \\email

\m/ (>.<) \m/
--- rock on ---


Website Designed and Developed by Pablo Varando.