A <cfquery> tag with a well-formed SQL statement attempts to save a query object to the SESSION scope but generates a ru
Posted: Thu Mar 17, 2022 12:19 pm
A <cfquery> tag with a well-formed SQL statement attempts to save a query object to the
SESSION scope but generates a runtime error. When the same tag is executed with its name property pointing to a variable in local variables scope, the <cfquery> tag succeeds without a runtime error.
What is the most likely reason for this?
A. Query objects cannot be saved to the SESSION scope.
B. The SESSION scope only allows a limited number of variables per user.
C. The SESSION scope allocates limited memory per user.
D. Session management must enabled in the current application.
Answer : D
Your application has a page that has very high traffic. The page is rendered from data in a database. Your application should only run a query if it has been longer than 60 seconds since its last execution.
Which attribute of the cfquery tag allows you to specify a time where a query should NOT be executed again?
A. cachedAfter
B. cachedBefore
C. cachedWithin
D. cachedFor
Answer : C
Where is cached content saved by the <cfcache> tag by default?
A. on the server hard disk
B. in the browser cache
C. in server memory
D. in a server-side database
Answer : C
Which ORM function should you use when loading data from the database to ensure that you receive the most recent data on the server?
A. entityLoad()
B. entityReload()
C. entityLoadByPK()
D. entityLoadByExample()
Answer : B
Given the following CFQUERY tag:
<cfquery name="qArtist" datasource="cfartgallery">
SELECT *
FROM Artists -
</cfquery>
Which statement caches the query object in memory?
A. <cfcache action="put" name="qArtist" id="qArtistQuery">
B. <cfcache action="get" name="qArtist" id="qArtistQuery">
C. <cfcache action="put" value="#qArtist#" id="qArtistQuery">
D. <cfcache action="put" value="qArtist" id="qArtistQuery">
Answer : C
SESSION scope but generates a runtime error. When the same tag is executed with its name property pointing to a variable in local variables scope, the <cfquery> tag succeeds without a runtime error.
What is the most likely reason for this?
A. Query objects cannot be saved to the SESSION scope.
B. The SESSION scope only allows a limited number of variables per user.
C. The SESSION scope allocates limited memory per user.
D. Session management must enabled in the current application.
Answer : D
Your application has a page that has very high traffic. The page is rendered from data in a database. Your application should only run a query if it has been longer than 60 seconds since its last execution.
Which attribute of the cfquery tag allows you to specify a time where a query should NOT be executed again?
A. cachedAfter
B. cachedBefore
C. cachedWithin
D. cachedFor
Answer : C
Where is cached content saved by the <cfcache> tag by default?
A. on the server hard disk
B. in the browser cache
C. in server memory
D. in a server-side database
Answer : C
Which ORM function should you use when loading data from the database to ensure that you receive the most recent data on the server?
A. entityLoad()
B. entityReload()
C. entityLoadByPK()
D. entityLoadByExample()
Answer : B
Given the following CFQUERY tag:
<cfquery name="qArtist" datasource="cfartgallery">
SELECT *
FROM Artists -
</cfquery>
Which statement caches the query object in memory?
A. <cfcache action="put" name="qArtist" id="qArtistQuery">
B. <cfcache action="get" name="qArtist" id="qArtistQuery">
C. <cfcache action="put" value="#qArtist#" id="qArtistQuery">
D. <cfcache action="put" value="qArtist" id="qArtistQuery">
Answer : C