Skip to main content
Inspiring
June 5, 2009
Question

Locating Data when *.cfm is in another folder

  • June 5, 2009
  • 1 reply
  • 727 views

I'm really new to dealing with Cold Fusion.  I have my database in a folder in the root directory of the web call access_db.  My *.cfc and *.cfm files are all in the root also.  And everything is peachy.But now I need to create a *.cfm in a folder call "2009" which is in the root directory.

Do I need to have the *.cfc in that same folder?

Example of *.cfc I built for Root and it works.

<cfcomponent>

            <cffunction name="getIndPointCareerlist" access="public" returntype="query">

                        <cfset IndPointCareerlist="">

                        <cfquery name="IndPointCareerlist" datasource="owfootball_accesscf_Information">

SELECT IPTCNAME, IPTCPTS

            FROM INDPOINTCAREER

                        </cfquery>

                        <cfreturn IndPointCareerlist>

            </cffunction>

</cfcomponent>

I guess what I'm asking how do I tell the *.cfm to find the data when the file is in a different folder and what do I need in place to do this.

Thanks.

This topic has been closed for replies.

1 reply

Inspiring
June 5, 2009

It doesn't matter where the data is.  You have already set up a datasource on your admin page.

Regarding the cfc, you can put them all in a certain spot also, and declare that location on your admin page.

Jeffh13Author
Inspiring
June 5, 2009

Ok so currently I have them all of my cfc and cfm are in my root directory and they are working.

And if I create a new folding and move one of those cfm into a new folder it should work?

Jeffh13Author
Inspiring
June 5, 2009

Sorry Thanks