Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple code gone mad - Please help!!!!

Status
Not open for further replies.

josel

Programmer
Joined
Oct 16, 2001
Messages
716
Location
US
I am just about ready to take over the world (as I do every night) and hit a brick wall ... Bellow is a CF template which is loaded to a main template using <cfinclude>.

I am using access DB - I keep on getting following error

----------------------------------------------------
Error Diagnostic Information

An error occurred while evaluating the expression:


&quot;#getUser.Company#&quot;



Error near line 22, column 75.

Error resolving parameter GETUSER.COMPANY


ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either:

You have misspelled the parameter name, or
You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag.


The error occurred while processing an element with a general identifier of (CFINPUT), occupying document position (22:4) to (22:92).


Date/Time: 02/03/02 08:55:14
Browser: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
Remote Address: 127.0.0.1
HTTP Referrer: Query String: ID=20
---------------------------------------------------------

I can assure you that the field Company is properly spelled. I even remed out line of code and I got same error with following <cfinput> ... I then removed the <cfoutput> tags (open/close) and still got the same error - and last, I changed the tag from <cfinput> to <input> and NADA!

Please help, I need to take over world sometime this tonight! If not, I will try tomorrow night and the next :)


Thank you all in advance;

josel

----------------------------------------------------------
CODE FOLLOWS:

<cfif isdefined(&quot;session.UserName&quot;)>
<cfif isdefined(&quot;#URL.ID#&quot;)>
<cfquery name=&quot;getUser&quot; datasource=&quot;deco&quot; dbtype=&quot;odbc&quot;>
select *
from accounts
where UserID=#URL.ID#
</cfquery>
<cfquery name=&quot;getID&quot; datasource=&quot;deco&quot; dbtype=&quot;odbc&quot;>
select *
from UserID
where UserID=#URL.ID#
</cfquery>
</cfif>
</cfif>

<cfif (&quot;getUser.recordcount&quot; IS NOT &quot;0&quot;) AND (&quot;getID.recordcount&quot; IS NOT &quot;0&quot;)>
<cfoutput>

<table width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;1&quot;>
<tr>
<td valign=&quot;top&quot; height=&quot;24&quot;>
<cfinput type=&quot;text&quot; name=&quot;company&quot; length=&quot;30&quot; maxlength=&quot;30&quot; value=&quot;#getUser.Company#&quot;>
</td>
</tr>
<tr>
<td valign=&quot;top&quot; height=&quot;24&quot;>
<cfinput type=&quot;text&quot; name=&quot;firstname&quot; length=&quot;30&quot; maxlength=&quot;30&quot; required=&quot;yes&quot; message=&quot;First name is required&quot; value=&quot;#getUser.FirstName#&quot;>
</td>
</tr>
<tr>
<td valign=&quot;top&quot; height=&quot;24&quot;>
<cfinput type=&quot;text&quot; name=&quot;lastname&quot; length=&quot;30&quot; maxlength=&quot;30&quot; required=&quot;yes&quot; message=&quot;Last name is required&quot; value=&quot;#getUser.LastName#&quot;>
</td>
</tr>
<tr>
<td valign=&quot;top&quot; height=&quot;24&quot;>
<cfinput type=&quot;text&quot; name=&quot;address1&quot; length=&quot;30&quot; maxlength=&quot;50&quot; required=&quot;yes&quot; message=&quot;Your street name & address is required&quot; value=&quot;#getUser.Address1#&quot;>
</td>
</tr>
<tr>
<td valign=&quot;top&quot; height=&quot;24&quot;>
<cfinput type=&quot;text&quot; name=&quot;address2&quot; length=&quot;30&quot; maxlength=&quot;50&quot; value=&quot;#getUser.Address2#&quot;>
</td>
</tr>
<tr>
<td valign=&quot;top&quot; height=&quot;24&quot;>
<cfinput type=&quot;text&quot; name=&quot;city&quot; length=&quot;30&quot; maxlength=&quot;30&quot; required=&quot;yes&quot; message=&quot;City is required&quot; value=&quot;#getUser.City#&quot;>
</td>
</tr>
<tr>
<td valign=&quot;top&quot; height=&quot;24&quot;>
<cfinput type=&quot;text&quot; name=&quot;state&quot; length=&quot;2&quot; maxlength=&quot;2&quot; required=&quot;yes&quot; message=&quot;State is required&quot; value=&quot;#getUser.State#&quot;>
</td>
</tr>
<tr>
<td valign=&quot;top&quot; height=&quot;24&quot;>
<cfinput type=&quot;text&quot; name=&quot;zipcode&quot; length=&quot;10&quot; maxlength=&quot;10&quot; required=&quot;yes&quot; message=&quot;Zip code is required&quot; value=&quot;#getUser.ZipCode#&quot;>
</td>
</tr>
<tr>
<td valign=&quot;top&quot; height=&quot;24&quot;>
<cfinput type=&quot;text&quot; name=&quot;email&quot; length=&quot;30&quot; maxlength=&quot;50&quot; required=&quot;yes&quot; message=&quot;Email address is required&quot; value=&quot;#getUser.UserCode#&quot;>
</td>
</tr>
<tr>
<td valign=&quot;top&quot; height=&quot;24&quot;>
<cfinput type=&quot;text&quot; name=&quot;email2&quot; length=&quot;30&quot; maxlength=&quot;50&quot; required=&quot;yes&quot; message=&quot;Please re-enter your email address&quot; value=&quot;#getUser.UserCode#&quot;>
</td>
</tr>
<tr>
<td valign=&quot;top&quot; height=&quot;24&quot;>
<cfinput type=&quot;text&quot; name=&quot;phone&quot; length=&quot;20&quot; maxlength=&quot;20&quot; value=&quot;#getUser.HomePhone#&quot;>
</td>
</tr>
<tr>
<td valign=&quot;top&quot; height=&quot;24&quot;>
<cfinput type=&quot;text&quot; name=&quot;fax&quot; length=&quot;20&quot; maxlength=&quot;20&quot; value=&quot;#getUser.FaxPhone#&quot;>
</td>
</tr>
<tr>
<td valign=&quot;top&quot; height=&quot;24&quot;>
<cfinput type=&quot;text&quot; name=&quot;workphone&quot; length=&quot;20&quot; maxlength=&quot;20&quot; value=&quot;#getUser.WorkPhone#&quot;>
</td>
</tr>
<tr>
<td valign=&quot;top&quot; height=&quot;24&quot;>
<cfinput type=&quot;text&quot; name=&quot;cellphone&quot; length=&quot;20&quot; maxlength=&quot;20&quot; value=&quot;#getUser.CellPhone#&quot;>
</td>
</tr>
<tr>
<td valign=&quot;top&quot; height=&quot;25&quot;>
<cfinput type=&quot;password&quot; name=&quot;password1&quot; length=&quot;30&quot; maxlength=&quot;30&quot; required=&quot;yes&quot; message=&quot;Password is required&quot; value=&quot;#getID.UserPswd#&quot;>
</td>
</tr>
<tr>
<td valign=&quot;top&quot; height=&quot;25&quot;>
<cfinput type=&quot;password&quot; name=&quot;password2&quot; length=&quot;30&quot; maxlength=&quot;30&quot; required=&quot;yes&quot; message=&quot;Please re-enter your password&quot; value=&quot;#getID.UserPswd#&quot;>
</td>
</tr>
<tr>
<td valign=&quot;top&quot; height=&quot;24&quot;>
<input type=&quot;checkbox&quot; name=&quot;mailist&quot;>
</td>
</tr>
<tr>
<td valign=&quot;top&quot; height=&quot;24&quot;>
<input type=&quot;checkbox&quot; name=&quot;share&quot;>
</td>
</tr>
</table>

</cfoutput>

<cfelse>

Sorry, we were unable to retrieve your profile information.<br>
If you feel this is an error, please contact us at your earliest convenience.<br>
<p>&nbsp;
If you have not registered, please do so <a href=&quot;register.cfm&quot;>NOW</a>!&quot;<br>
<p>&nbsp;
If you have already registered, you need to <a href=&quot;login.cfm&quot;>SIGN IN</a> to access your profile information.
<p>&nbps;
Thank you!<br>
<p>&nbsp;

</cfif> If you have the knowledge, consult and educate those who need it! - Jose Lerebours
 
OK, I just solved it :)

It turns out that CF does not like the idea I was referencing URL.ID within included template (above code).

Hummm, why not? Well, since URL.ID and my session.UserID were the same, I figure I change URL.ID with sessin.UserID. All values show just fine and all templates resolve without a hitch.

Thank you for reading this post!

josel If you have the knowledge, consult and educate those who need it! - Jose Lerebours
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top