Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Database Access / August 2008



Tip: Looking for answers? Try searching our database.

Connection to database problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AlHaq - 27 Aug 2008 15:15 GMT
I'm getting the following error:

The error occurred in
C:\Inetpub\R3Staging\Htdocs\qadmin\questionnaire\questionnaire.cfc: line 220
 
218 :      <CFFUNCTION NAME="getresults" HINT="get questionnaire results"
ACCESS="Public" RETURNTYPE="query">
219 :         <CFARGUMENT NAME="questionnaireid" REQUIRED="yes" TYPE="numeric">
220 :         <cfquery  datasource="#application.datasource#"
username="#application.datasourceusername#"
password="#application.datasourcepassword#" name="getresults">
221 :             select *
222 :             from tbl_response

 
Line seems where the problem is.

Here is the rest of the code

<CFFUNCTION NAME="getresults" HINT="get questionnaire results" ACCESS="Public"
RETURNTYPE="query">
        <CFARGUMENT NAME="questionnaireid" REQUIRED="yes" TYPE="numeric">
        [b]<cfquery  datasource="#application.datasource#"
username="#application.datasourceusername#"
password="#application.datasourcepassword#" name="getresults">[/b]
            select *
            from tbl_response
            where res_qus_id = #arguments.questionnaireid#   
            order by res_createdby
        </cfquery>
        <CFRETURN getresults>
    </CFFUNCTION>   

   
Here is the log file error:

Element DATASOURCEUSERNAME is undefined in APPLICATION. The specific sequence
of files included or processed is:
C:\Inetpub\R3Staging\Htdocs\qadmin\questionnaire\results.cfm, line: 220    

Apperciate all help. Thanks.
SafariTECH - 27 Aug 2008 20:16 GMT
seems pretty clear what the message says - those variables don't exist in the application scope when you run the code.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.