We help IT Professionals succeed at work.
Get Started

ColdFusion/SQL Procedure Undefined Variable Problem

Last Modified: 2012-05-09
Hey Experts,

     I am having a bit of a problem modifying a web application.  I keep receiving an error message that says "Element DISTRICTA is undefined in RSCF_CLIENT"  I know enough to know that there is a problem with a variable but not much beyond that (please bear with, still learning).  I have attach all the pertinent code to the best of my knowledge.  
     The first SELECT statement was previously done and functions perfectly, the second one is the one I am having problems with.  The WHERE condition in the second statement has been modified as a troubleshooting attempt, the 23318 constant is not how it is meant to be but it is a record I have verified to exist in the database table.  I hope all my rambling makes sense to somebody and I thank everybody for their help in advanced.  Please let me know if I need to provide any additional information.

ColdFusion Code:

    <cfstoredproc procedure="pr_get_LoggedUser_Info" datasource="#Application.CDP_DSN#">
        <cfprocparam type="In" cfsqltype="CF_SQL_INTEGER" value="#rsCF_Client_ID.CID#" null="No">
        <cfprocresult name="rsCF_Client">


SQL Procedure Code:

SELECT	ct.ConType_Abbr,
		Ltrim(Rtrim(c.FirstName)) AS FirstName,
		Ltrim(Rtrim(c.LastName)) AS LastName,
FROM		cdp_Contacts c, cdp_ContactTypes ct
WHERE	c.ContactType_ID = ct.ContactType_ID
AND		c.Contact_ID = @Logged_CID

SELECT	Contact_ID,
        CompanyName AS DistrictA
FROM	cdp_Contacts
WHERE	Contact_ID = 23318

Open in new window

Watch Question
Most Valuable Expert 2015
This problem has been solved!
Unlock 1 Answer and 10 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE