Stump the CFChump – 4

December 3, 2012 by Mike Henke    2 Comments
Posted under: cfchump · ColdFusion

I am doing a "Stump the CFChump" series. I recently passed the ColdFusion 9 exam and this is material I learned while studying. I have several CodeSchool gift cards to giveaway so comments who answer correctly I'll email you the discount code. "Stump the Chumps" is from the "Car Talk" so I am spinning that title for ColdFusion. These are questions that stumped me when studying.

  • Please try to not google or run the code before answering.
  • This is for fun so don't be afraid to guess.
  • Let others guess so phrase your comment like "I think … because …" or "My guess is … because …".
  • I ran out of code school gift cards and will be getting more.

Stump the CFChump 3

Answer

C. best comment explanation

Stump the CFChump 4

Question

What tag and attribute would you use to set the maximum number of rows returned to 10 in the code below?

<cfstoredproc procedure = "foo_proc"
dataSource = "MY_SYBASE_TEST" username = "sa"
password = "" dbServer = "scup" dbName = "pubs2"
returnCode = "Yes" debug = "Yes">

<!--- cfprocresult tags --->
<cfprocresult name = RS1>
<!--- cfprocparam tags --->
<cfprocparam type = "IN" CFSQLType = CF_SQL_INTEGER value = "1">
<cfprocparam type = "OUT" CFSQLType = CF_SQL_DATE variable = FOO>
<!--- Close the cfstoredproc tag. --->
</cfstoredproc>

Answers

A. <cfstoredproc maxrows="10" ...>
B. <cfprocresult maxrows="10" ...>
C. <cfprocparam type = "IN" maxrows="10" ...>
D. <cfprocparam type = "OUT" maxrows="10" ...>

2 Comments + Add Comment

  • Matthew Abbott

    I would guess it would be B. cfprocresult will hold the result set or query returned, so without looking it up, I'd guess cfprocresult.

  • Matt Newell

    I am going to have to go with B also.

    cfprocparam would only have to do with the value of the parameter and cfstoredproc would be the connection string for the db server. So by elimination B it is.

  • Got anything to say? Go ahead and leave a comment!