• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

QueryNew

Participant ,
Mar 17, 2010 Mar 17, 2010

Copy link to clipboard

Copied

Hi guyz,

I am looping thru a read of xls records (POI.cfc) and inserting any warning or error into a session.querynew object... some how come some of elements of querynew object comes as empty even though there enough warnings... Any help appreciated..

     <cfloop query="myResultSet.query">
         <cfif column6 eq "">
         <cfset newRow = QueryAddRow(session.myQuery)>
         <cfset temp = QuerySetCell(session.myQuery, "EID", "#column1#", counterQuery)>
         <cfset temp = QuerySetCell(session.myQuery, "Message",
          " doesnt have a Department", counterQuery)>
        <cfelse>
         <cfset ValDept = Validate.Dept(application.orc,#column6#)>
         <cfif ValDept.recordcount gt 0>
          <cfset DCode= ValDept.dep>
         <cfelse>
          <cfset newRow = QueryAddRow(session.myQuery)>
          <cfset temp = QuerySetCell(session.myQuery, "EID",
           "#column1#", counterQuery)>
          <cfset temp = QuerySetCell(session.myQuery, "Message",
           " Department <i>"& column6
          & "</i> doesnt exist in Database<br>", counterQuery)>        
         </cfif>
        </cfif>
      

        <cfif column7 eq "">
         <cfset newRow = QueryAddRow(session.myQuery)>
         <cfset temp = QuerySetCell(session.myQuery, "EID",
          "#column1#", counterQuery)>
         <cfset temp = QuerySetCell(session.myQuery, "Message",
          " doesnt have a Location", counterQuery)>           
        <cfelse>
         <cfset ValLoc = Validate.Loc(application.orc,#column7#)>
         <cfif ValLoc.recordcount gt 0>
          <cfset LCode= ValLoc.loc>
         <cfelse>
          <cfset newRow = QueryAddRow(session.myQuery)>
          <cfset temp = QuerySetCell(session.myQuery, "EID",
           "#column1#", counterQuery)>
          <cfset temp = QuerySetCell(session.myQuery, "Message",
           " Location <i>"& column7
          & "</i> doesnt exist in Database<br>", counterQuery)>         
          </cfif>
        </cfif>

     <cfset counterQuery = counterQuery + 1>

</cfloop>

TOPICS
Advanced techniques

Views

538

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 17, 2010 Mar 17, 2010

For these commands,

<cfset temp = QuerySetCell(session.myQuery, "EID", "#column1#", counterQuery)>

You are better off using session.myQuery.recordcount to specify the row instead of counterquery.

Votes

Translate

Translate
LEGEND ,
Mar 17, 2010 Mar 17, 2010

Copy link to clipboard

Copied

For these commands,

<cfset temp = QuerySetCell(session.myQuery, "EID", "#column1#", counterQuery)>

You are better off using session.myQuery.recordcount to specify the row instead of counterquery.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 17, 2010 Mar 17, 2010

Copy link to clipboard

Copied

LATEST

Thank you Dan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation