RecordCount Error

Can someone please look over this code and check for any
problems? I'm receiving the RECORDCOUNT is undefined error for the
following line:
<cfif GetStudentDetails.RecordCount eq 0>
Thanks!
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\Authenticate.cfm/////////////////////////////////////// ////////
<cfsetting enablecfoutputonly="true">
<cfsetting enablecfoutputonly="false">
<!--- Check the supplied Username and Password against the
database. --->
<cfif GetStudentDetails.RecordCount eq 0>
<!---
If the query recordcount is zero, the username did not
exist. Send the user back to the login form
and show the appropriate error message.
--->
<cfset variables.errorMessage = "The Student ID you
provided, <b>" & FORM.Username & "</b>, is an
invalid Student ID.">
<cfelse>
<!--- The username exists, validate the supplied password
for this user. --->
<cfset variables.hashedPassword = Hash(FORM.Password)>
<cfif variables.hashedPassword neq
GetStudentDetails.PIN>
<!--- If the supplied password for this user does not
equal the password on record, set the error message. --->
<cfset variables.errorMessage = "The Pin you supplied for
user <b>" & FORM.Username & "</b> was
incorrect.">
<cfelse>
<!--- A valid user has authenticated with the system,
perform necessary actions. --->
<!--- Update the LastLogin timestamp. --->
<cfquery name="qryUpdateLastLoginTS"
datasource="#request.datasource#">
UPDATE Users
SET LastLogin_TS = #CreateODBCDateTime(Now())#
WHERE STUDENTID = #GetSudentDetails.STUDENTID#
</cfquery>
<cfquery name="GetStudentDetails"
datasource="#request.datasource#">
SELECT STUDENTID, STUDENTLASTNAME, STUDENTFIRSTNAME,
STUDENTMIDDLENAME FROM StudentClasses
</cfquery>
<!---
Create the request scope structure to hold the user data.
Notice it is NOT necessary to first create the
request.User structure with StructNew(). Simply using dot
notation after the User portion will tell
ColdFusion the variable is a structure.
--->
<cfset request.User.LoggedIn = "1">
<cfset request.User.Username = FORM.Username>
<cfset request.User.FirstName =
GetStudentDetails.STUDENTFIRSTNAME>
<cfset request.User.LastName =
GetStudentDetails.STUDENTLASTNAME>
<cfset request.User.LastLogin =
GetStudentDetails.LastLogin_TS>
<cfset tmpMessage = "You were last here on " &
DateFormat(GetStudentDetails.LastLogin_TS, "mm.dd.yyyy") & " at
" & TimeFormat(GetStudentDetails.LastLogin_TS, "hh:mm tt")
& ".">
<cfset request.User.LoginMessage =
IIF(GetStudentDetails.LastLogin_TS neq "", "tmpMessage", DE("This
is your first visit!"))>
</cfif>
</cfif>

Here's my query:
<cfquery name="GetStudentDetails"
datasource="#request.datasource#">
SELECT STUDENTID, STUDENTLASTNAME, STUDENTFIRSTNAME,
STUDENTMIDDLENAME
FROM StudentClasses
WHERE STUDENTID = #FORM.Username#
</cfquery>
We have already moved the query up. :)
The error has changed from a record count error to a database
error:
Error Executing Database Query.
Data type mismatch in criteria expression.
The error occurred in
C:\CFusionMX7\wwwroot\securitytutorial\authenticate.cfm: line 33
Called from
C:\CFusionMX7\wwwroot\securitytutorial\Application.cfc: line 106
Called from
C:\CFusionMX7\wwwroot\securitytutorial\authenticate.cfm: line 33
Called from
C:\CFusionMX7\wwwroot\securitytutorial\Application.cfc: line 106
31 : SELECT STUDENTID, STUDENTLASTNAME, STUDENTFIRSTNAME,
STUDENTMIDDLENAME
32 : FROM StudentClasses
33 : WHERE STUDENTID = #FORM.Username#
34 : </cfquery>
35 :

Similar Messages

  • Assigning a Variable a Null Value

    Hi all. I've got a loop that queries a query outside of the
    loop. The problem is, the query may get defined, and it may not.
    But if it gets defined, how do I undefine it for the next loop
    iteration. Here's some code to wrap your head around it (edited for
    brevity).
    <cfloop>
    <cfset queryValue = possibleEmptyString >
    <cfif Len(queryValue)>
    <cfquery name="queryName" dbtype="query">
    select * from something
    </cfquery>
    </cfif>
    <cfif IsDefined("queryName") AND
    queryName.RecordCount>
    error="some error message"
    </cfif>
    </cfloop>
    So, is there not a Function that sets the var to Undefined,
    or Null, or something? If not, what's the alternative?
    Thanks all! ;)

    <cfloop>
    <cfset queryValue = possibleEmptyString >
    <cfset queryName = QueryNew()> <!--- this ensures
    that queryName is always defined, and is always a query --->
    <cfif Len(queryValue)>
    <cfquery name="queryName" dbtype="query">
    select * from something
    </cfquery>
    </cfif>
    <cfif queryName.RecordCount>
    error="some error message"
    </cfif>
    </cfloop>

  • Workshop/cajun

    1) Can the Return XML in Edit Maps and Interface support more that one response
    type? For example, normally the response type would be <recordcount>1</recordcount><securitytoken="123"/>
    However an error message condition can also returned, like: <recordcount>1</recordcount><error>Invalid
    user</error>
    In the examples I have seen there is support for repeating data <InputMapMultiple>.
    I have two questions:
    I have the following message returned
    <Message>testmessage</Message> <count>12</count> <error> <errseq>1</errseq> <errmesg>No
    here</errmesg> <errseq>2</errseq> <errmesg>Do some GeoCaching</errmesg> </error>
    What would the XML map look like to parse this, and the other question is what
    would the java code look like to parse the <error> tag. I already have a Java
    method associated with the call to parse the non repeating section.
    It is a bit of a mystery to me how the xml-map would associate a java method.
    In the example you provide, how does the <item xm:multiple="String name in nameAddr....>
    know how to call the getTotalPrice method.
    I can provide details on this also.
    Thanks in advance.

    Hi, Bob. Thanks for the questions.
    1) Can the Return XML in Edit Maps and Interface support more that oneresponse
    type? For example, normally the response type would be<recordcount>1</recordcount><securitytoken="123"/>
    However an error message condition can also returned, like:<recordcount>1</recordcount><error>Invalid
    user</error>You can only specify one return xml shape per method. You might consider an
    alternate design where your methods return void but based on some work that
    is done, send a particular callback in response, where your callbacks you
    send have the different XML shapes. Alternatively, you may want to send back
    an XML shape which has <recordcount>, <securitytoken> and <error> in it. If
    your method is succesful, simply return that shape with an empty error node,
    otherwise, put your error message in there.
    I have the following message returned
    <Message>testmessage</Message> <count>12</count> <error><errseq>1</errseq> <errmesg>No
    here</errmesg> <errseq>2</errseq> <errmesg>Do some GeoCaching</errmesg></error>
    What would the XML map look like to parse this, and the other question iswhat
    would the java code look like to parse the <error> tag. I already have aJava
    method associated with the call to parse the non repeating section.Have a look at the jws file I have attached. The "doSomething" method
    returns the XML shape you specified.
    It is a bit of a mystery to me how the xml-map would associate a javamethod.
    In the example you provide, how does the <item xm:multiple="String name innameAddr....>
    know how to call the getTotalPrice method.In our InputMapMulitple.jws sample, the parameter-xml map you are referring
    to is associated with the getTotalPrice method simply because it is located
    in the block of javadocs which immediately precedes the getTotalPrice method
    declaration.
    Hope this helps!
    Ian M. Goldstein
    Developer Relations Engineer
    BEA Systems, Inc.
    "Bob McMillan" <[email protected]> wrote in message
    news:[email protected]...
    >
    1) Can the Return XML in Edit Maps and Interface support more that oneresponse
    type? For example, normally the response type would be<recordcount>1</recordcount><securitytoken="123"/>
    >
    >
    >
    However an error message condition can also returned, like:<recordcount>1</recordcount><error>Invalid
    user</error>
    In the examples I have seen there is support for repeating data<InputMapMultiple>.
    I have two questions:
    I have the following message returned
    <Message>testmessage</Message> <count>12</count> <error><errseq>1</errseq> <errmesg>No
    here</errmesg> <errseq>2</errseq> <errmesg>Do some GeoCaching</errmesg></error>
    >
    >
    >
    What would the XML map look like to parse this, and the other question iswhat
    would the java code look like to parse the <error> tag. I already have aJava
    method associated with the call to parse the non repeating section.
    It is a bit of a mystery to me how the xml-map would associate a javamethod.
    In the example you provide, how does the <item xm:multiple="String name innameAddr....>
    know how to call the getTotalPrice method.
    I can provide details on this also.
    Thanks in advance.
    [MyWebService.jws]

  • Problems with CFCHART

    Hi there, i'm having trouble upgrading some <CFGRAPH>
    code to <CFCHART>
    There seems to be some functionality removed which doesn't
    allow unique IDs to be passed to a URL. For example:
    In CF5 we have a page which graphs the Top 20 most viewed
    pages on our site. Each bar of the graph then links to that unique
    page when you click on it (ie.
    http://www.oursite.co.uk/page.cfm?ID=1234)
    IN MX, I cant figure out how to pass the unique ID (PGE_ID)
    of that query row to the URL attribute of <CFCHART> . Here is
    my Code:
    <CFQUERY name="qPageHitsReport"
    datasource="#Application.DSN#">
    SELECT PGE_HITCOUNT, PGE_DESC, PGE_ID
    FROM ( SELECT PGE_HITCOUNT, PGE_DESC, PGE_ID
    FROM RGUDBA.WEBPAGE
    ORDER BY PGE_HITCOUNT DESC )
    WHERE ROWNUM < 21
    </CFQUERY>
    <CFCHART chartwidth="600" chartheight="500" title="Top 20
    Pages by Page Views" format="png"
    URL="/general/info/page.cfm?pge=#PGE_ID#">
    <CFCHARTSERIES type="horizontalbar"
    query="qPageHitsReport" itemcolumn="PGE_DESC"
    valuecolumn="PGE_HITCOUNT">
    </CFCHARTSERIES>
    </CFCHART>
    With this code I get an error message:
    Error Occurred While Processing Request
    Variable PGE_ID is undefined.
    Is this not possible anymore? Surely Adobe havn't removed a
    really useful piece of functionality? ..... Or have they?
    Ally

    you can only pass dynamic values of valuecolumn ($value$),
    itemcolumn
    ($itemlabel$) and serieslabel ($serieslabel$) in the URL
    attribute of
    cfchart.
    in your case you could probably pass $itemlabel$ to a page
    that would
    then query your db to select page id based on page
    description and
    cflocate to that page...
    URL="redirectpage.cfm?pd=$itemlabel$"
    then on redirectpage.cfm:
    <CFQUERY name="getPage" datasource="#Application.DSN#">
    SELECT PGE_ID
    FROM ...
    WHERE PGE_DESC = "#URL.pd#"
    </CFQUERY>
    <cflocation url="........?pge=#getPage.PGE_ID#">
    you may want to incorporate validation routines into the
    above to
    prevent sql injection and 0 recordcount errors...
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com

  • Insert Opportunity - Product Revenue Child using WS2 - SBL-EAI-04316 error

    Hello,
    I´ve got the following error message trying to insert a product revenue child object to opportunity using WS2.
    Fehler beim Übertragen der Daten ins CRM on Demand!
    Tue Apr 26 08:06:21 CEST 2011 :: Fehler bei der Verarbeitung von Argument (Error while processing argument) urn:/crmondemand/xml/Opportunity/Data:ListOfOpportunity für Operation OpportunityInsert(SBL-EAI-04316) :: Error at thread 27334345
    Using SOAPUI the insert are successful.
    <soapenv:Body>
    <ns:OpportunityInsert_Input>
    <data:ListOfOpportunity lastpage="" recordcount="">
    <data:Opportunity operation="">
              <data:ExternalSystemId>0010110107664043232</data:ExternalSystemId>
              <data:ListOfProductRevenue lastpage="" recordcount="">
    <data:ProductRevenue operation="">
    <data:Id></data:Id>
    <data:CurrencyCode>EUR</data:CurrencyCode>
    <data:StartCloseDate>00:00:00</data:StartCloseDate>
    <data:OpportunityName>4043232</data:OpportunityName>
    <data:AccountName></data:AccountName>
    <data:stpvstums010>ÖLSERVICE ALL INKL. 5W-40</data:stpvstums010>
    <data:PurchasePrice>4960</data:PurchasePrice>
    <data:ProductName>Filter/Oel</data:ProductName>
    <data:ProductPartNumber>09XXXX</data:ProductPartNumber>
    <data:OpportunityExternalSystemId>0010110107664043232</data:OpportunityExternalSystemId>
    <data:ipvzahlums002>100</data:ipvzahlums002>
    <data:ipvzahlums001>1</data:ipvzahlums001>
              <data:ExternalSystemId>0010110107664043232001</data:ExternalSystemId>
    <data:cpvwhrums002>0</data:cpvwhrums002>
    <data:cpvwhrums003>4960</data:cpvwhrums003>
    </data:ProductRevenue>
    </data:ListOfProductRevenue>
    </data:Opportunity>
    </data:ListOfOpportunity>
    <ns:Echo></ns:Echo>
    </ns:OpportunityInsert_Input>
    </soapenv:Body>
    </soapenv:Envelope>
    Trying to insert the child via webservice 2.0 the request fails (see error message above)
    I'm running out of ideas because I'm using the same values with the webservice request.
    thx in advance
    kind regards
    Klaus

    Hello,
    I've solved the problem. It seems to be that the axis framwork has some problems to handle the complex structure of the opportunity object respectively the containing array structures (Lists). We rebuild the webservice client after deleting the unnecessary elements from the opportunity wsdl file. Doing so the webservice client works as expected. Be careful to not delete required fields which are necessary for the response message, e.g.:
    - ModifiedBy+
    - ModifiedByID+
    - ModifiedDate+
    - CreatedBy+
    - CreatedByID+
    - CreatedDate+
    - ModId+
    - Id+
    I`m sure that this cannot be the preferred way to solve the problem - but it works for me.
    regards
    Klaus

  • Crystal report for visual studio 2010 data source object is not valid error

    Hello,
    I receive an "data source object is not valid" error when I want to print one CR document after setting an ADODB.Recordset on SetDataSource method of my report.
    On my developer station, this operation works without problem but on client station, I get this error.
    The redistributable package for client is installed on client side (CRRuntime_32bit_13_0_1.msi).
    Can someone help me?
    Thank you.

    Thank's for your answers
    Dim rsPkLst As ADODB.Recordset = Nothing
    Dim report As New crPickingList
    ' Fill ADODB.Recordset with SQL Statment
    If rsPkLst.RecordCount > 0 Then
          report.SetDataSource(rsPkLst) ' Error : The data source object is invalid
    EndIf
    This error appears during  "report.SetDataSource(rsPkLst)" instruction.
    ADODB drivers are already installed and my ADODB.Recordset is filled with good records.
    This project is an updated project from Visual Studio 2003 to Visual studio 2010 and the old version was running fine.
    Developer and client station runs under Windows XP SP3.
    On developer side I install CRforVS_13_0_1 (BuildVersion=13.0.1.220.Cortez_CR4VS).
    On client side I install CRRuntime_32bit_13_0_1.msi.
    Both stations use Microsoft .Net Framework 4.
    Move to ADO.NET is a solution but, for the moment, I do not have the time to change all applications from my company.
    (I get this error from all application updated from VS 2003 to VS 2010 developed since 2005)
    David.

  • Error in using SQLLDR LKM

    I am trying to load fixed length flat file into Oracle table in ODI by using LKM File to Oracle (SQLLDR).
    But getting below error in Call sqlldr step,
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (most recent call last):
      File "<string>", line 22, in <module>
    Load Error: See C:\Aditya\ODI\SQL_Loader/TARIFF_SERVICE.log for details
        at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
        at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:322)
        at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
        at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2472)
        at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:47)
        at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
        at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
        at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
        at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
        at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
        at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
        at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
        at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
        at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
        at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
        at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
        at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
        at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
        at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
        at java.lang.Thread.run(Thread.java:662)
    Caused by: Traceback (most recent call last):
      File "<string>", line 22, in <module>
    Load Error: See C:\Aditya\ODI\SQL_Loader/TARIFF_SERVICE.log for details
        at org.python.core.PyException.fillInStackTrace(PyException.java:70)
        at java.lang.Throwable.<init>(Throwable.java:181)
        at java.lang.Exception.<init>(Exception.java:29)
        at java.lang.RuntimeException.<init>(RuntimeException.java:32)
        at org.python.core.PyException.<init>(PyException.java:46)
        at org.python.core.PyException.doRaise(PyException.java:219)
        at org.python.core.Py.makeException(Py.java:1166)
        at org.python.core.Py.makeException(Py.java:1170)
        at org.python.pycode._pyx13.f$0(<string>:59)
        at org.python.pycode._pyx13.call_function(<string>)
        at org.python.core.PyTableCode.call(PyTableCode.java:165)
        at org.python.core.PyCode.call(PyCode.java:18)
        at org.python.core.Py.runCode(Py.java:1204)
        at org.python.core.Py.exec(Py.java:1248)
        at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:172)
        at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
        ... 19 more
    TARIFF_SERVICE.log is not getting created.
    Code generated is,
    import java.lang.String
    import java.lang.Runtime as Runtime
    from jarray import array
    import java.io.File
    import os
    import re
    ctlfile = r"""C:\Aditya\ODI\SQL_Loader/TARIFF_SERVICE.ctl"""
    logfile = r"""C:\Aditya\ODI\SQL_Loader/TARIFF_SERVICE.log"""
    outfile = r"""C:\Aditya\ODI\SQL_Loader/TARIFF_SERVICE.out"""
    oracle_sid=''
    if len('XE')>0: oracle_sid = '@'+'XE'
    loadcmd = r"""sqlldr 'HR/<@=snpRef.getInfo("DEST_PASS") @>%s' control='%s' log='%s' > "%s" """ % (oracle_sid,ctlfile, logfile, outfile)
    rc = os.system(loadcmd)
    if rc <> 0 and rc <> 2:
        raise "Load Error", "See %s for details" % logfile
    # Init Vars
    nbIns = 0
    nbRej = 0
    nbNull = 0
    strprt = ""
    maxAllowedError = r"""0"""
    c = 0
    flag = 0
    # Open log file
    f = open(logfile, "r")
    try:
        lines = f.readlines()
        for line in lines:
            if line.rstrip().upper().endswith(r"""HR.TC$_0SAS_TARIFF_SERVICEREPLACE:""".upper()):
                flag = 1
                c = 0
            if flag == 1:
                if c > 0 and c <= 4:
                    if c == 1 :
                        nbIns = int(re.findall("\d+", line)[0])
                    elif c == 2:
                        nbRej = int(re.findall("\d+", line)[0])
                    elif c == 4:
                        nbNull = int(re.findall("\d+", line)[0])
                        break
            c+=1
        strprt = "\n\tIns:\t%s\n\tReject:\t%s\n\tNullField:\t%s" % (nbIns, nbRej, nbNull)
    finally:
        f.close()
    # if some rows has been rejected due to invalide data, check KM option LOA_ERRORS
    if rc == 2:
        if nbRej > int(maxAllowedError):
            raise strprt
            break
    Can anyone suggest how to resolve this issue?
    Thanks,
    Aditya

    Hi
    i am facing same issue did any body find any solution for it
    Hi 1005380,
    Thanks for quick respond.
    Source(position based file so i cant change the phsical length)
    name,type,physical length,logical length,-,-,recordCount
    pading
    String
    1
    1
    50
    null
    2
    journal_name
    String
    2
    50
    50
    null
    journal_line_number
    String
    52
    6
    50
    null
    segment1
    String
    58
    6
    50
    null
    segment2
    String
    64
    8
    50
    null
    segment3
    String
    72
    5
    50
    null
    segment4
    String
    77
    3
    50
    null
    segment5
    String
    80
    1
    50
    null
    segment6
    String
    81
    4
    50
    null
    segment7
    String
    85
    3
    50
    null
    segment8
    String
    88
    5
    50
    null
    line_desc
    String
    93
    240
    50
    null
    debit_amount
    String
    333
    15
    50
    null
    credit_amount
    String
    348
    15
    50
    null
    Target(DB)
    order,name,type,logicalLength,scale,Source mapping fields
    55
    ENTERED_DR
    NUMBER
    0
    -127
    Debit_amt(sorce)
    56
    ENTERED_CR
    NUMBER
    0
    -127
    credit_amt(source)
    60
    REFERENCE1
    VARCHAR2
    100
    0
    journalname(source)
    142
    CUSTOM_ATTRIBUTE1
    VARCHAR2
    150
    0
    segment1(s)
    143
    CUSTOM_ATTRIBUTE2
    VARCHAR2
    150
    0
    segment2(s)
    144
    CUSTOM_ATTRIBUTE3
    VARCHAR2
    150
    0
    segment3(s)
    145
    CUSTOM_ATTRIBUTE4
    VARCHAR2
    150
    0
    segment4(s)
    146
    CUSTOM_ATTRIBUTE5
    VARCHAR2
    150
    0
    segment5(s)
    147
    CUSTOM_ATTRIBUTE6
    VARCHAR2
    150
    0
    segment6(s)
    148
    CUSTOM_ATTRIBUTE7
    VARCHAR2
    150
    0
    segment7(s)
    149
    CUSTOM_ATTRIBUTE8
    VARCHAR2
    150
    0
    segment8(s)
    i am omitting padding and line_desc from source for mapping.
    Note : 1)even i am mapping single column eg: journal_name and reference1 for more than 1000 records i am getting the Error(Number format exception).for 999 records it is picking up and it is not throwing any error.
    2)for 999 records i mapped all the fields its working fine,if pass more than 999 records it throwing error.
    knowledge Modules:
    LKM File to SQL and IKM SQL Control Append
    Execution Steps:
    loading Drop work table ,Create work table and error at Load data
    Error code:
    Source Code:
    select
    journal_name
    C3_JOURNAL_NAME,
    segment1
    C4_SEGMENT1,
    segment2
    C5_SEGMENT2,
    segment3
    C6_SEGMENT3,
    segment4
    C7_SEGMENT4,
    segment5
    C8_SEGMENT5,
    segment6
    C9_SEGMENT6,
    segment7
    C10_SEGMENT7,
    segment8
    C11_SEGMENT8,
    debit_amount
    C1_DEBIT_AMOUNT,
    credit_amount
    C2_CREDIT_AMOUNT
    from
    TABLE
    /*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=ADA_ENTRY_STG_LINESSNP$CRLOAD_FILE=/C:/DavidNithin/GL_Abstraction/adaoasisla.dat.07012013_13h23.txtSNP$CRFILE_FORMAT=FSNP$CRFILE_SEP_FIELD=0x0009SNP$CRFILE_SEP_LINE=0ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=padingSNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=1SNP$CRLENGTH=1SNP$CRPRECISION=50SNP$CRREC_CODE_LIST=2SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=journal_nameSNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=2SNP$CRLENGTH=50SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=journal_line_numberSNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=52SNP$CRLENGTH=6SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=segment1SNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=58SNP$CRLENGTH=6SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=segment2SNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=64SNP$CRLENGTH=8SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=segment3SNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=72SNP$CRLENGTH=5SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=segment4SNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=77SNP$CRLENGTH=3SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=segment5SNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=80SNP$CRLENGTH=1SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=segment6SNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=81SNP$CRLENGTH=4SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=segment7SNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=85SNP$CRLENGTH=3SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=segment8SNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=88SNP$CRLENGTH=5SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=line_descSNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=93SNP$CRLENGTH=240SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=debit_amountSNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=333SNP$CRLENGTH=15SNP$CRPRECISION=50SNP$CRSNP$CRDWG_COLSNP$CRCOL_NAME=credit_amountSNP$CRTYPE_NAME=STRINGSNP$CRLINE_OFFSET=348SNP$CRLENGTH=15SNP$CRPRECISION=50SNP$CR$$SNPS_END_KEY*/
    Target Code:
    insert into ODI.C$_0MNA_ENTERY_STG_LINES_ADA
      C3_JOURNAL_NAME,
      C4_SEGMENT1,
      C5_SEGMENT2,
      C6_SEGMENT3,
    C7_SEGMENT4,
    C8_SEGMENT5,
    C9_SEGMENT6,
    C10_SEGMENT7,
    C11_SEGMENT8,
    C1_DEBIT_AMOUNT,
    C2_CREDIT_AMOUNT
    values
    :C3_JOURNAL_NAME,
    :C4_SEGMENT1,
    :C5_SEGMENT2,
    :C6_SEGMENT3,
    :C7_SEGMENT4,
    :C8_SEGMENT5,
    :C9_SEGMENT6,
    :C10_SEGMENT7,
    :C11_SEGMENT8,
    :C1_DEBIT_AMOUNT,
    :C2_CREDIT_AMOUNT
    Error message:
    java.lang.NumberFormatException: For input string: "1,000"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
      at java.lang.Integer.parseInt(Inte

  • Wierd ColdFusion erro : Error occurred while processing request.

    Hi there ,
    I am a graduate student and new to ColdFusion.I started working on this already developed project by someone couple of years ago , and the client wants some changes to be done.so i went ahead and did some small modifications to the appearance of the form(insertdata.cfm page) like adding some more options to a drop down menu , changing the label names and so on and am very sure this changes would not have effected the application in any way.And the place where the message says the error can be , i didnt even touch that part.Now after 4 days i start getting this weird error saying " Error Occurred While Processing Request
    The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.
    Null Pointers are another name for undefined values."
    And this happens randomly not everytime i access the website or different webpages.Here are the errors.
    The error occurred in /export/web/virtual/web3_unt_edu/cps/webaccess/sites/Amarillo/index.cfm: line 8
    5 :   SELECT UserName,Password FROM user_data WHERE UserName=
    6 :   <cfqueryparam value="#FORM.UserName#" maxlength="8">
    7 :     AND Password=
    8 :   <cfqueryparam value="#FORM.Password#" maxlength="8">
    9 :   </cfquery>
    10 :   <cfif MM_rsUser.RecordCount NEQ 0>
    I tried adding " cfsqltype="cf_sql_clob"  " in cfqueryparam also on my friends advice , but it doesnt work out.
    2nd ERROR
    The error occurred in /export/web/virtual/web3_unt_edu/cps/webaccess/sites/Amarillo/InsertData.cfm: line 13
    11 :   <cflocation url="#MM_failureURL#" addtoken="no">
    12 : </cfif>
    13 : <cfquery name="rsDay" datasource="cps">
    14 : SELECT days FROM days
    15 : </cfquery>
    3rd ERROR
    The error occurred in /export/web/virtual/web3_unt_edu/cps/webaccess/sites/Amarillo/InsertData.cfm: line 27
    25 : ORDER BY ethnicity ASC
    26 : </cfquery>
    27 : <cfquery name="rsHospitals" datasource="cps_amarillo">
    28 : SELECT *
    29 : FROM hospitals
    Can anyone help me with this. I have to get the modifications done in 2 weeks.
    Thank you
    Craj

    Hi Mak
             I can get the stack trace for now , but here is my complete code , may be this ll give u complete idea .........
    The index page where i am getting the first error
    <cfif IsDefined("FORM.UserName")>
      <cfset MM_redirectLoginSuccess="menu.cfm">
      <cfset MM_redirectLoginFailed="../../fail.htm">
      <cfquery  name="MM_rsUser" datasource="cps_amarillo">
        SELECT UserName,Password FROM user_data WHERE UserName=
      <cfqueryparam value="#FORM.UserName#" maxlength="8">
        AND Password=
      <cfqueryparam value="#FORM.Password#" maxlength="8">
      </cfquery>
      <cfif MM_rsUser.RecordCount NEQ 0>
        <cftry>
          <cflock scope="Session" timeout="30" type="Exclusive">
            <cfset Session.MM_Username=FORM.UserName>
            <cfset Session.MM_UserAuthorization="">
          </cflock>
          <cfif IsDefined("URL.accessdenied") AND true>
            <cfset MM_redirectLoginSuccess=URL.accessdenied>
          </cfif>
          <cflocation url="#MM_redirectLoginSuccess#" addtoken="no">
          <cfcatch type="Lock">
            <!--- code for handling timeout of cflock --->
          </cfcatch>
        </cftry>
      </cfif>
      <cflocation url="#MM_redirectLoginFailed#" addtoken="no">
      <cfelse>
      <cfset MM_LoginAction=CGI.SCRIPT_NAME>
      <cfif CGI.QUERY_STRING NEQ "">
        <cfset MM_LoginAction=MM_LoginAction & "?" & XMLFormat(CGI.QUERY_STRING)>
      </cfif>
    </cfif>
    <cfinclude template="../../../Connections/cps_amarillo.cfm">
    <cfif IsDefined("FORM." & "UserName")>
      <cfscript>
        MM_valUsername=Evaluate("FORM." & "UserName");
        MM_fldUserAuthorization="";
        MM_redirectLoginSuccess="menu.cfm";
        MM_redirectLoginFailed="../../fail.htm";
        MM_dataSource=MM_cps_amarillo_DSN;
        MM_queryFieldList = "UserName,Password";
        if (MM_fldUserAuthorization IS NOT "") MM_queryFieldList=MM_queryFieldList & "," & MM_fldUserAuthorization;
      </cfscript>
      <cfquery datasource=#MM_dataSource# name="MM_rsUser" username=#MM_cps_amarillo_USERNAME# password=#MM_cps_amarillo_PASSWORD#>
      SELECT #MM_queryFieldList# FROM user_data WHERE UserName='#Replace(MM_valUsername,"\'","
      ","ALL")#' AND Password='#FORM.Password#'
      </cfquery>
      <cfif MM_rsUser.RecordCount GREATER THAN 0>
        <cfscript>
          // username and password match - this is a valid user
          Session.MM_Username = MM_valUsername;
          if (MM_fldUserAuthorization IS NOT "") {
            Session.MM_UserAuthorization = MM_rsUser[MM_fldUserAuthorization][1];
          } else {
            Session.MM_UserAuthorization = "";
          if (IsDefined("accessdenied") AND true) {
            MM_redirectLoginSuccess = Evaluate("accessdenied");
        </cfscript>
        <cflocation url="#MM_redirectLoginSuccess#" addtoken="no">
      </cfif>
      <cflocation url="#MM_redirectLoginFailed#" addtoken="no">
      <cfelse>
      <cfscript>
        MM_LoginAction = CGI.SCRIPT_NAME;
        if (CGI.QUERY_STRING NEQ "") MM_LoginAction = MM_LoginAction & "?" & CGI.QUERY_STRING;
      </cfscript>
    </cfif>
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Amarillo Login Screen</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <script type="text/JavaScript">
    <!--
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_validateForm() { //v4.0
      var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
      for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
        if (val) { nm=val.name; if ((val=val.value)!="") {
          if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
            if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
          } else if (test!='R') { num = parseFloat(val);
            if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
            if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
              min=test.substring(8,p); max=test.substring(p+1);
              if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
        } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
      } if (errors) alert('The following error(s) occurred:\n'+errors);
      document.MM_returnValue = (errors == '');
    //-->
    </script>
    </head>
    <body>
    <div id="Layer2" style="position:absolute; left:26px; top:112px; width:683px; height:56px; z-index:2">
      <div align="right"><font size="+6"><strong><font color="#999999" size="5" face="Verdana, Arial, Helvetica, sans-serif">Seniors
        / Volunteers for Childhood Immunization<br />
        </font></strong></font><font color="#999999" size="5"><strong><font size="4" face="Verdana, Arial, Helvetica, sans-serif">Web
        Access Database</font></strong></font></div>
    </div>
    <div id="instructions" style="position:absolute; left:160px; top:182px; width:259px; height:30px; z-index:3"><font color="#999999" size="5"><strong><font size="4" face="Verdana, Arial, Helvetica, sans-serif">Please
      enter your user name and password...</font></strong></font></div>
    <div id="LayerLogin" style="position:absolute; left:427px; top:182px; width:310px; height:94px; z-index:4">
      <form ACTION="<cfoutput>#MM_loginAction#</cfoutput>" name="form1" id="form1" method="POST">
        <p><img src="../../../images/image14.gif" alt="" name="UserNameImg" width="150" height="21" border="0" id="UserNameImg" />
          <input name="UserName" type="text" id="UserName" size="15" maxlength="15" />
          <br />
          <img src="../../../images/image15.gif" alt="" name="PasswordImg" width="150" height="21" border="0" id="PasswordImg" />
          <input name="Password" type="password" id="Password" size="17" maxlength="15" />
        </p>
        <p align="right">
          <input name="Submit" type="submit" id="Submit" onclick="MM_validateForm('UserName','','R','Password','','R');return document.MM_returnValue" value="Log In!" />
        </p>
      </form>
    </div>
    </body>
    </html>
    I checked it again and again , but the code seems to work well on a local host ..... but not whn i upload it to server. Please let me know where i am goin wrong.
    Thank you

  • Can't find answer to Query Of Queries runtime error

    Not only I browsed this forum but also googled this problem but unfortunnately I have no luck in finding the answer.
    All I did was writing this simple query:
    <cfquery name="test" dbtype="query">
    select SSN,BirthDate from myquery where SSN <> '' OR BirthDate <> ''
    </cfquery>
    and I got this error:
    Query Of Queries runtime error.
    Comparison exception while executing <>.
    Unsupported Type Comparison Exception: The <> operator does not support comparison between the following types:
    Left hand side expression type = "DOUBLE".
    Right hand side expression type = "STRING".
    I tried the following and did not work either, still got the same error.
    <cfquery name="test" dbtype="query"> 
    select SSN,BirthDate from myquery
    where SSN <> <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value=""/>  
    OR BirthDate <> <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value=""/></cfquery>
    Has someone ever encountered the same problem and know how to solve it?

    HELP ! ! !  Going into testing soon. I need this to work to get correct report results ! ! ! !
    My issue seems similar to the one under discussion and the reply from lawhite01 caught my eye. Can you roll my issue into this discussion?
    This is a 2 parter. The second part is the QoQ part, but the 1st part has a line in the query that is similar to the QoQ one and it uses the same data. Part 1 also throws an error.
    PART # 1.
    I'm trying to use a query table created through QueryNew and then query it.
    I need multiple columns in the query table I create:
    <cfscript>
            tot_AllCurrentDraftListing = QueryNew("AnnounceNum, JP_PDLoc, JP_JS_Title, JP_JS, JP_KW_1, JP_JobTitle, JP_Open, JP_Close, JP_CloseType, JP_CloseName, JP_PosNeed, JP_DirectHire, JP_Desc, JP_Draft, JP_Archived, JP_State, JP_AreaName, JP_AreaID, JP_AreaAlias, JP_Fac_SU, JP_Fac_Facility, JP_FAC_ID, JP_Grade1, JP_sal_low1, JP_sal_high1, JP_Grade2, JP_sal_low2, JP_sal_high2, JP_Grade3, JP_sal_low3, JP_sal_high3, JP_Grade4, JP_sal_low4, JP_sal_high4, JP_Grade5, JP_sal_low5, JP_sal_high5, JP_Posted, JP_TypeHire, JP_HRemail");
        </cfscript>
    Then I populate all the cells of the query table.
    Then I set up to use the created query table.
    I do this first:
        <cfquery name="qAltPostID" datasource="#at_datasource#">
             SELECT AltPoster, fk_Job_AnnounceNum
             from JOB_JPContacts
             Where AltJPContactType = 'AltPosterID'
             and AltPoster = '#session.IHSUID#'
             </cfquery>
    Then, in my first query using the created query, I expect to need to choose from multiple values, so I'm using this line in the query (this is NOT a QoQ query):
                and AnnounceNum IN (<cfqueryparam cfsqltype="CF_SQL_varchar" value="#ValueList(qAltPostID.fk_Job_AnnounceNum)#">)
    I've also tried:
                   and AnnounceNum IN (#ValueList(qAltPostID.fk_Job_AnnounceNum)#)   
    and:
                   and JOB_AnnounceNum IN
                    SELECT fk_Job_AnnounceNum
                    from JOB_JPContacts
                    Where AltJPContactType = 'AltPosterID'
                    and AltPoster = '#session.IHSUID#'
    ERROR is: one record should return. I get 0.
    PART # 2: Here's the QoQ part.
    I get the error:
    Query Of Queries runtime error.
    Comparison exception while executing IN.
    Unsupported Type Comparison Exception: The IN operator does not support comparison between the following types:
    Left hand side expression type = "LONG".
    Right hand side expression type = "STRING".
    A tutorial I found gave an example using only one column for this part of the fix:
         tot_AllCurrentDraftListing = QueryNew("AnnounceNum", "CF_SQL_VARCHAR")
    How would I set up the query with the datatype when I'm using multiple columns:
    <cfscript>
            tot_AllCurrentDraftListing = QueryNew("AnnounceNum, JP_PDLoc, JP_JS_Title, JP_JS, JP_KW_1, JP_JobTitle, JP_Open, JP_Close, JP_CloseType, JP_CloseName, JP_PosNeed, JP_DirectHire, JP_Desc, JP_Draft, JP_Archived, JP_State, JP_AreaName, JP_AreaID, JP_AreaAlias, JP_Fac_SU, JP_Fac_Facility, JP_FAC_ID, JP_Grade1, JP_sal_low1, JP_sal_high1, JP_Grade2, JP_sal_low2, JP_sal_high2, JP_Grade3, JP_sal_low3, JP_sal_high3, JP_Grade4, JP_sal_low4, JP_sal_high4, JP_Grade5, JP_sal_low5, JP_sal_high5, JP_Posted, JP_TypeHire, JP_HRemail");
        </cfscript>
    I used this code after all the cells contained values and before running my QoQ query:
            <cfloop index="intID" from="1" to="#tot_AllCurrentDraftListing.recordcount#" step="1">
                <cfset tot_AllCurrentDraftListing["AnnounceNum"] [intID] = JavaCast("string", intID) />
            </cfloop>
              Is that correct?
    Thanks.
    Whoever can help me with this should be awarded extra points ! ! ! !

  • WDDX packet parse error at line 1, column 1. Content is not allowed in prolog..

    We have a CFC page that was working fine before moving to CF9 from CF8.  Any ideas on why it is no longer working?  It is not processing at all now - just giving us this error.
    <cfcomponent displayname="Checks For Email Address" output="true" hint="Checks for an Existing Email">
                   <cffunction access="remote" name="CheckInData" returntype="boolean" description="Checks Email and Returns True if Email Address Exists" hint="Checks Email and Returns True if Email Address Exists">
                   <cfargument name="Email_Check" type="string" required="true"/>
                   <cfquery name="data" datasource="datasource" dbtype="OLEDB">
                SELECT                 
                                  Email
                FROM                    
                                  EmailTable
                WHERE
                                  Email=<cfqueryparam value="#Trim(arguments.Email_Check)#" cfsqltype="cf_sql_varchar" />
                AND
                                  Company_ID='#company_ID#'
            </cfquery>
            <cfif data.RecordCount EQ 0>
                   <cfreturn false>
            <cfelse>
                   <cfreturn true>
            </cfif>
        </cffunction>

    @cover,
    I see two things you might change, but I don't know if they will solve the problem.  First, you don't need the "dbtype" attribute anymore with CFQuery, unless it's dbtype="query".  Second, it's possible you have a race condition on your query results variable ("data").  You might add a line right below the CFArgument tag:
    <cfset var data = "">
    This will make the "data" variable local to the function.
    Other than that, I can't see anything obvious.  I'm not at all versed in WDDX, so maybe someone else will have some better ideas.
    -Carl V.

  • Internal error (-2014) Goods Issue with Batch Items added through UI

    Hello Experts,
    I've added a button to my Production Order screen labeled 'Issue Components' that is meant to streamline the process, and it works, except when the ProdOrder has Batch controlled items on it. When that happens it returns Internal error (-2014)<br><br>
    I've tried stepping through the code and it doesn't error until the final Add
    Here is my function, Thanks for the Help!<br><br>
    I'm using CitiXSys Inventory Pro and am pulling the items from the Picked table, that's what that sQuery does. It returns correctly. I've also set everything to 'Manual' instead of 'Backflush'<br><br><br>
    <pre>
    Private Sub IssueComponents(ByVal iDocNum As Integer)
            Try
                'Declaring the needed variables'
                Dim oRec As SAPbobsCOM.Recordset
                Dim oGoodsIssue As SAPbobsCOM.Documents
                Dim bIssueLineAdded As Boolean = False, sQuery As String = "", x As Integer = 0, iCode As Long = 0, sErrorMessage As String = ""
                Dim tmpLot As String = ""
                'Instanciating the Goods Issue'
                oGoodsIssue = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInventoryGenExit)
                'Initialzing the SBO object'
                oRec = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                'Assing the header of the Goods Issue'
                oGoodsIssue.DocDate = Date.Now
                oGoodsIssue.DocDueDate = Date.Now
                'Getting the entire "Manual" components for this production order to issue them'
                sQuery &= "Select PK1.U_DocNo, KI.U_ItemCode, KI.U_BseLnNo, OW.DocEntry, KI.U_Quantity, KI.U_WhsCode, KI2.U_BatSrlNo, KI2.U_LotNo from [OWOR] OW (NOLOCK) INNER JOIN [@ctx_pkin] PK ON OW.DocNum = PK.U_BaseDoc," & vbNewLine
                sQuery &= "[@ctx_PKIN] PK1 (NOLOCK) INNER JOIN [@CTX_KIN1] KI (NOLOCK) ON PK1.U_DocNo = KI.U_DocNo," & vbNewLine
                sQuery &= "[@ctx_KIN1] KI1 (NOLOCK) INNER JOIN [@CTX_KIN2] KI2 (NOLOCK) ON KI1.U_DocNo = KI2.U_DocNo and KI1.U_BseLnNo = KI2.U_BseLnNo" & vbNewLine
                sQuery &= "where OW.DocNum = '" & iDocNum & "' and PK.U_BaseType = 202 and PK1.U_DocNo = PK.U_DocNo and KI1.U_DocNo = PK.U_DocNo and KI1.U_BseLnNo = KI.U_BseLnNo" & vbNewLine
                'Executing the query'
                oRec.DoQuery(sQuery)
                'Looping through the "Manual" components'
                For x = 0 To oRec.RecordCount - 1
                    'Prompting the user'
                    oAppl.StatusBar.SetText("Issuing Components...(" & x + 1 & " of " & oRec.RecordCount & ")", SAPbouiCOM.BoMessageTime.bmt_Long, SAPbouiCOM.BoStatusBarMessageType.smt_Warning)
                    'Adding the previous line if applicable'
                    If bIssueLineAdded Then
                        oGoodsIssue.Lines.Add()
                    End If
                    'Filling the line information'
                    oGoodsIssue.Lines.WarehouseCode = oRec.Fields.Item("U_WhsCode").Value 'dIssueComponents(x).Item("WhsCode")
                    'oGoodsIssue.Lines.TransactionType = SAPbobsCOM.BoTransactionTypeEnum.botrntComplete
                    oGoodsIssue.Lines.BaseEntry = oRec.Fields.Item("DocEntry").Value 'oProductionOrder.AbsoluteEntry
                    oGoodsIssue.Lines.BaseType = 202                                          'Production Order Type'
                    oGoodsIssue.Lines.BaseLine = oRec.Fields.Item("U_BseLnNo").Value 'GetBaseLine(oProductionOrder.AbsoluteEntry, dIssueComponents(x).Item("Component"))
                    'oGoodsIssue.Lines.ItemCode = oRec.Fields.Item("U_ItemCode").Value
                    oGoodsIssue.Lines.Quantity = oRec.Fields.Item("U_Quantity").Value 'Math.Round(oRec.Fields.Item("U_Quantity").Value, 2) 'dIssueComponents(x).Item("PlanQty")
                    'Checking if the item is neither lot or serial controlled item'
                    If oRec.Fields.Item("U_BatSrlNo").Value = "" And oRec.Fields.Item("U_LotNo").Value = "" Then
                        'Nothing controlled item'
                    ElseIf oRec.Fields.Item("U_BatSrlNo").Value <> "" Then
                        'Lot controlled item'
                        tmpLot = oRec.Fields.Item("U_BatSrlNo").Value
                        'oAppl.MessageBox("Lot: " & tmpLot & ", whs: " & oRec.Fields.Item("U_WhsCode").Value & ", qty: " & oRec.Fields.Item("U_Quantity").Value)
                        oGoodsIssue.Lines.BatchNumbers.Add()
                        oGoodsIssue.Lines.BatchNumbers.BatchNumber = oRec.Fields.Item("U_BatSrlNo").Value
                        oGoodsIssue.Lines.BatchNumbers.Quantity = oRec.Fields.Item("U_Quantity").Value 'Math.Round(oRec.Fields.Item("U_Quantity").Value, 2)
                        'Else
                        'Serial controlled item'
                        'oGoodsIssue.Lines.SerialNumbers.SystemSerialNumber = oRec.Fields.Item("").Value
                    End If
                    'Setting the line to be added'
                    bIssueLineAdded = True
                    'Movoing to the next record'
                    oRec.MoveNext()
                Next x
                'Checking if there was any component or not'
                If bIssueLineAdded Then
                    'Adding the Goods Issue'
                    iCode = oGoodsIssue.Add
                    If iCode <> 0 Then
                        oCompany.GetLastError(iCode, sErrorMessage)
                        oAppl.MessageBox("Goods Issue Production Order: " & iDocNum & " didn't get created for the following reason: " & serrormessage)
                    Else
                        oAppl.StatusBar.SetText("Components were issued successfully.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success)
                        'TODO: add to ProdOrder remarks field
                    End If
                End If
            Catch ex As Exception
                oAppl.MessageBox("IssueComponents() " & ex.Message)
                oAppl.StatusBar.SetText("Error in IssueComponenets() : " & ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
            End Try
        End Sub
    </pre>
    Edited by: Rob Daniels on May 30, 2011 10:33 PM

    Please use the latest upgrade of Inventory Pro from CitiXsys.
    If you are using SAP Business One 2007; use Inventory Pro 5.6 series
    For SAP Business One 8.8 and up; use Inventory Pro 6.6.1 and up

  • The value returned from the load function is not of type numeric  errors after migration to Coldfusion 11

    I am currently testing our website with CF11. It is currently working with CF8 however after migrating it to a new server running CF11 I have encountered the following error.
    The value returned from the load function is not of type numeric.
    The error occurred in
    D:/Applications/CFusion/CustomTags/nec/com/objects/address.cfc: line 263
    Called from D:/Applications/CFusion/CustomTags/nec/com/objects/contact.cfc: line 331
    Called from D:/Applications/CFusion/CustomTags/nec/com/objects/user.cfc: line 510
    Called from D:/Applications/CFusion/CustomTags/nec/com/objects/user.cfc: line 1675
    Called from D:/website/NECPhase2/action.validate.cfm: line 54
    261 : <cfif isNumeric(get.idCountry)>
    262 : <cfset rc = this.objCountry.setID(get.idCountry)>
    263 : <cfset rc = this.objCountry.load()>
    264 : </cfif>
    265 : <cfset this.sPostcode = get.sPostcode>
    Have there been any changes between CF8 and CF11 that could  cause this error?
    Does anyone have ideas?

    This is the code in file object file country.cfc (nec.com.objects.country):
    <cfcomponent displayname="Country object" hint="This is a Country object, it allows you to access and set values in the Country.">
    <!---
    // Construct this object
    --->
    <cfset this.objFunctions = CreateObject( 'component', 'nec.com.system.functions' )>
    <cfscript>
      this.idCountryID = 0;
      this.sCountryName = "";
      this.sISOCode = "";
      this.sDHLCode = "";
      this.iErrorID = "";
    </cfscript>
    <!---
    // The following functions are the setters and getters. offering us a better way to get
    // at the contents of the object
    --->
    <!---
    // Getters
    --->
    <cffunction name="getID" displayname="Get ID" returntype="numeric" output="false" hint="This returns the ID of the current item.">
      <cfreturn this.idCountryID>
    </cffunction>
    <cffunction name="getsCountryName" displayname="Get sCountryName" returntype="string" output="false" hint="This gets the sCountryName value of this item.">
      <cfreturn this.sCountryName>
    </cffunction>
    <cffunction name="getsISOCode" displayname="Get sISOCode" returntype="string" output="false" hint="This gets the sISOCode value of this item.">
      <cfreturn this.sISOCode>
    </cffunction>
    <cffunction name="getsDHLCode" displayname="Get sDHLCode" returntype="string" output="false" hint="This gets the sDHLCode value of this item.">
      <cfreturn this.sDHLCode>
    </cffunction>
    <cffunction name="iError" displayname="Get iError" returntype="numeric" output="false" hint="This returns the iError of the current item.">
      <cfreturn this.iError>
    </cffunction>
    <!---
    // Setters
    --->
    <cffunction name="setID" displayname="Set ID" returntype="boolean" output="false" hint="This sets the ID value of this item.">
      <cfargument name="idCountryID" required="true" type="numeric" displayname="ID" hint="The ID to use.">
      <cfset this.idCountryID = arguments.idCountryID>
      <cfreturn true>
    </cffunction>
    <cffunction name="setsCountryName" displayname="Set sCountryName" returntype="boolean" output="false" hint="This sets the sCountryName value of this item.">
      <cfargument name="sCountryName" required="true" type="string" displayname="sCountryName" hint="The sCountryName to use.">
      <cfset this.sCountryName = arguments.sCountryName>
      <cfreturn true>
    </cffunction>
    <cffunction name="setsISOCode" displayname="Set sISOCode" returntype="boolean" output="false" hint="This sets the sISOCode value of this item.">
      <cfargument name="sISOCode" required="true" type="string" displayname="sISOCode" hint="The sISOCode to use.">
      <cfset this.sISOCode = arguments.sISOCode>
      <cfreturn true>
    </cffunction>
    <cffunction name="setsDHLCode" displayname="Set sDHLCode" returntype="boolean" output="false" hint="This sets the sDHLCode value of this item.">
      <cfargument name="sDHLCode" required="true" type="string" displayname="sDHLCode" hint="The sDHLCode to use.">
      <cfset this.sDHLCode = arguments.sDHLCode>
      <cfreturn true>
    </cffunction>
    <!---
    // Clear, to empty out the contents of this object
    --->
    <cffunction name="clear" displayname="Clear items Details" returntype="boolean" output="false" hint="Clears out all of the items details.">
      <cfscript>
       this.sCountryName = "";
       this.sISOCode = "";
       this.sDHLCode = "";
       this.iErrorID = "";
      </cfscript>
      <cfreturn true>
    </cffunction>
    <!---
    // The following functions deal with the load, save and deleting of objects
    --->
    <!---
    // Load
    --->
    <cffunction name="load" displayname="Load items details" returntype="numeric" output="false" hint="This loads in all the information about an item.">
      <cfset rc = this.clear()>
      <!---
      // First of all we need to get the name of the data source we are going to be using
      --->
      <cfscript>
      objDS = CreateObject("component","nec.com.system.settings");
      sDatasource = objDS.getDatasource();
    </cfscript>
      <!---
      // Check to see if it exists
      --->
      <cftry>
       <cfquery name="checkID" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("load: checkID: '#this.idCountryID#' #cfcatch.detail#");
        </cfscript>
        <cfset this.iErrorID = iErrorID>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif not checkID.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         if(isDefined("session.afr")){
          whichOne = "#session.afr.getsAFRNumber()#";
         } else {
          whichOne = "";
         iErrorID = objError.addError("A Country with that id doesn't exists.[#this.idCountryID#][#whichOne#]");
        </cfscript>
       <cfset this.iErrorID = iErrorID>
       <cfreturn iErrorID>
      </cfif>
      <!---
      // If we got past all then then load in the details
      --->
      <cftry>
       <cfquery name="get" datasource="#sDatasource#">
        SELECT idCountryID, RTRIM(sCountryName) as sCountryName, RTRIM(sISOCode) as sISOCode, RTRIM(sDHLCode) as sDHLCode
        FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("load: get: #cfcatch.detail#");
        </cfscript>
        <cfset this.iErrorID = iErrorID>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfset this.idCountryID = get.idCountryID>
      <cfset this.sCountryName = get.sCountryName>
      <cfset this.sISOCode = get.sISOCode>
      <cfset this.sDHLCode = get.sDHLCode>
      <cfset this.iErrorID = "">
      <cfreturn true>
    </cffunction>
    <!---
    // Save
    --->
    <cffunction name="save" displayname="Save items Details" returntype="numeric" output="false" hint="Saves (to some source) the current details for the ID of the item.">
      <!---
      // First of all we need to get the name of the data source we are going to be using
      --->
      <cfscript>
      objDS = CreateObject("component","nec.com.system.settings");
      sDatasource = objDS.getDatasource();
    </cfscript>
      <!---
      // Now check to see if ithat ID exists
      --->
      <cftry>
       <cfquery name="checkID" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("save: checkID: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <!---
      // If it doesn't exist, then add the record, otherwise update the record
      --->
      <cfif not checkID.recordCount>
       <cfreturn this.add()>
      <cfelse>
       <cfreturn this.update()>
      </cfif>
    </cffunction>
    <!---
    // Add
    --->
    <cffunction name="add" displayname="Add Country" returntype="numeric" output="false" hint="This adds a Country.">
      <!---
      // Check to see if that a different item isn't already using the same unique details
      --->
      <cftry>
       <cfquery name="checkUnique" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE sCountryName = '#this.objFunctions.scrubText(this.sCountryName)#'
        OR sISOCOde = '#this.objFunctions.scrubText(this.sISOcode)#'
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("add: checkUnique: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif checkUnique.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("A Country with that name or ISO code already exists. idCountryID=#checkUnique.idCountryID#");
        </cfscript>
       <cfreturn iErrorID>
      </cfif>
      <cftry>
       <cfquery name="add" datasource="#sDatasource#">
        SET nocount on
        INSERT INTO tblCountry(sCountryName, sISOCode, sDHLCode)
        VALUES('#this.objFunctions.scrubText(this.sCountryName)#','#this.objFunctions.scrubText(t his.sISOCode)#','#this.objFunctions.scrubText(this.sDHLCode)#')
        SELECT @@identity as autoID
        SET nocount off  
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("add: add: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfreturn add.autoID>
    </cffunction>
    <!---
    // Update
    --->
    <cffunction name="update" displayname="Update Country" returntype="numeric" output="false" hint="This updates a Country record.">
      <!---
      // Check to see if that a different item isn't already using the same unique details
      --->
      <cftry>
       <cfquery name="checkUnique" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE (sCountryName = '#this.objFunctions.scrubText(this.sCountryName)#'
        OR sISOCOde = '#this.objFunctions.scrubText(this.sISOcode)#')
        AND idCountryID <> #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("update: checkUnique: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif checkUnique.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("Another Country with that name already exists. idCountryID=#checkUnique.idCountryID#");
        </cfscript>
       <cfreturn iErrorID>
      </cfif>
      <!---
      // Attempt to update the record to the datasource
      // if this fails for any reason then we submit an error message
      // to the error component and return the ID of the error
      --->
      <cftry>
       <cfquery name="update" datasource="#sDatasource#">
        UPDATE tblCountry
        SET sCountryName = '#this.objFunctions.scrubText(this.sCountryName)#',
        sISOCode = '#this.objFunctions.scrubText(this.sISOCode)#',
        sDHLCode = '#this.objFunctions.scrubText(this.sDHLCode)#'
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("update: update: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfreturn this.idCountryID> 
    </cffunction>
    <!---
    // Delete
    --->
    <cffunction name="delete" displayname="Delete Country" returntype="numeric" output="false" hint="This deletes a Country record.">
      <!---
      // First of all we need to get the name of the data source we are going to be using
      --->
      <cfscript>
      objDS = CreateObject("component","nec.com.system.settings");
      sDatasource = objDS.getDatasource();
    </cfscript>
      <!---
      // Now check to see if ithat ID exists
      --->
      <cftry>
       <cfquery name="checkID" datasource="#sDatasource#">
        SELECT idCountryID
        FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("delete: checkID: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif not checkID.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("A Country with that id doesn't exists, delete failed.");
        </cfscript>
       <cfreturn iErrorID>
      </cfif>
      <!---
      // Now check to see if there are any dependancies, if so we can't delete the item
      --->
      <cftry>
       <cfquery name="checkDependancies" datasource="#sDatasource#">
        SELECT idCountry
        FROM tblAddress
        WHERE idCountry = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("delete: checkDependancies: idCountry: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfif checkDependancies.recordCount>
       <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("That Country is being used by an address, delete failed.");
        </cfscript>
       <cfreturn iErrorID>
      </cfif>
      <!---
      // Now attempt to remove the record.
      // if this fails for any reason then we submit an error message
      // to the error component and return the ID of the error
      --->
      <cftry>
       <cfquery name="delete" datasource="#sDatasource#">
        DELETE FROM tblCountry
        WHERE idCountryID = #this.idCountryID#
       </cfquery>
       <cfcatch>
        <cfscript>
         objError = CreateObject("component","nec.com.system.errors");
         iErrorID = objError.addError("delete: delete: #cfcatch.detail#");
        </cfscript>
        <cfreturn iErrorID>
       </cfcatch>
      </cftry>
      <cfreturn this.idCountryID>
    </cffunction>
    </cfcomponent>

  • Using NVL in Query of Query resulting in error

    I'm still using CF8 and Oracle 11G back-end.
    When I use NVL in the query of query I got error....Can't I use NVL to check on null value? Please help
    Here is my codes:
    <cfquery name="GetC2" datasource="#Trim(application.OracDSN)#">
         SELECT CamID2, rel2_2,p_ln2,p_fn2,ins,l_year
         FROM prt_temp
         WHERE Ins = 'CC'
         AND l_year =  '1481'
    AND NVL(Child_LN2,' ') <> ' '
    AND NVL(Child_FN2,' ') <> ' '
        </cfquery>
    <cfif GetC2.Recordcount NEQ 0>   
    <cfquery name="CheckRel2C2" dbtype="QUERY">
      SELECT CamID2, rel2_2
      FROM GetC2
      WHERE NVL(Rel2_2,' ') <> ' '
    AND NVL(p_ln2,' ') = ' '
    AND NVL(p_fn2,' ') = ' '
    AND Ins = 'CC'
    AND l_year =  '1481'
    </cfquery>
    </cfif>
    The error:
    Error Executing Database Query.
    Query Of Queries syntax error.
    Encountered "NVL ( Rel2_2 ,. Incorrect conditional expression, Expected one of [like|null|between|in|comparison] condition,

    NVL is an Oracle function, and is not available in ColdFusion Query of Query.  If you are trying to check for null values, then use IS NULL or IS NOT NULL.  So
    WHERE NVL(Rel2_2,' ') <> ' '
        AND NVL(p_ln2,' ') = ' '
        AND NVL(p_fn2,' ') = ' '
    becomes
    WHERE Rel2_2 IS NOT NULL
        AND p_ln2 IS NULL
        AND p_fn2 IS NULL
    -Carl V.

  • Why the error in one, but not the other

    Why does this code Generate the error:
    Complex object types cannot be converted to simple values.
    The expression has requested a variable or an intermediate
    expression result
    as a simple value, however, the result cannot be converted to
    a simple
    value. Simple values are strings, numbers, boolean values,
    and date/time
    values. Queries, arrays, and COM objects are examples of
    complex values.
    The most likely cause of the error is that you are trying to
    use a complex
    value as a simple one. For example, you might be trying to
    use a query
    variable in a <CFIF> tag. This was possible in
    ColdFusion 2.0 but creates an
    error in later versions.
    The error occurred in
    C:\Inetpub\wwwroot\2onboard\kBookList.cfm: line 40
    38 : <tr>
    39 : <td colspan="6">
    40 : <cfif showList IS NOT "yearly"><a class="nav"
    href=""> Yearly  </a>  </cfif>
    41 : <cfif showList IS NOT "complete"><a class="nav"
    href=""> Complete  </a>  </cfif>
    42 : <cfif showList IS NOT "wish"><a class="nav"
    href=""> Wish
    List  </a>  </cfif>
    CODE.........
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>2onboard.com - Kevin's Korner - Book
    List</title>
    <!--- SET DEFAULT VARIABLES --->
    <cfparam name="showList" default="complete">
    <cfparam name="showOrder" default="title">
    <cfparam name="showStatus" default="own">
    <!--- QUERIES --->
    <cfquery name="showList" datasource="2onboard">
    SELECT
    title,author,status,completed,pages,queue,rating,cover,series,book,link
    FROM books
    WHERE status = '#showStatus#'
    ORDER BY '#showOrder#'
    </cfquery>
    </head>
    <body>
    <div id="container"> <!--- GRAY ALL ENCOMPASING BOX
    --->
    <cfinclude template="header.cfm"> <!--- HEADER
    --->
    <cfinclude template="explanation.cfm"> <!---
    EXPLANITION OF SCREEN BOX --->
    <div class="raised"> <!--- CONTENT OF - HOME PAGE
    --->
    <b class="top"><b class="b1"></b><b
    class="b2"></b><b class="b3"></b><b
    class="b4"></b></b>
    <div class="boxcontent">
    <div class="boxcontenttext">
    <table cellspacing="0">
    <tr>
    <td><span class="title">Kevin's
    Korner</span><b> - Reading</b></td>
    <td colspan="5"
    align="right"><cfoutput> Library contains
    <b>#showList.recordCount#</b>
    books</cfoutput></td>
    </tr>
    <tr><td colspan="6"><span
    class="spacetext"> </span></td></tr>
    <tr>
    <td colspan="6">
    <cfif showList IS NOT "yearly"><a class="nav"
    href=""> Yearly  </a>  </cfif>
    <cfif showList IS NOT "complete"><a class="nav"
    href=""> Complete  </a>  </cfif>
    <cfif showList IS NOT "wish"><a class="nav"
    href=""> Wish
    List  </a>  </cfif>
    </td>
    CODE CONTINUES ON FROM HERE….
    BUT, if I take just the bare minimum and test it as the
    following, it works fine - WHY?
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <cfparam name="showList" default="complete">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title> </title>
    </head>
    <body>
    <cfif showList IS NOT "yearly"><a class="nav"
    href=""> Yearly  </a>  </cfif>
    <cfif showList IS NOT "complete"><a class="nav"
    href=""> Complete  </a>  </cfif>
    <cfif showList IS NOT "wish"><a class="nav"
    href=""> Wish
    List  </a>  </cfif>
    </body>

    > <cfparam name="showList" default="complete">
    This line creates showList as a simple string variable
    containing
    "complete".
    > <cfquery name="showList" datasource="2onboard">
    This line redefines showList as a recordset containing the
    data returned
    from the database which is not a simple variable and can not
    be accessed
    with code such as <cfoutput>#showList#</cfoutput>
    > <cfparam name="showList" default="complete">
    This line does NOT redefine showList back to a simple string
    because a
    <cfparam ...> only fires if the variable does not
    exist. The previous
    two lines would create the variable, thus it exists.
    jkgiven wrote:
    > Why does this code Generate the error:
    >
    > Complex object types cannot be converted to simple
    values.
    >
    > The expression has requested a variable or an
    intermediate expression result
    > as a simple value, however, the result cannot be
    converted to a simple
    > value. Simple values are strings, numbers, boolean
    values, and date/time
    > values. Queries, arrays, and COM objects are examples of
    complex values.
    >
    > The most likely cause of the error is that you are
    trying to use a complex
    > value as a simple one. For example, you might be trying
    to use a query
    > variable in a <CFIF> tag. This was possible in
    ColdFusion 2.0 but creates an
    > error in later versions.
    >
    > The error occurred in
    C:\Inetpub\wwwroot\2onboard\kBookList.cfm: line 40
    >
    > 38 : <tr>
    > 39 : <td colspan="6">
    > 40 : <cfif showList IS NOT "yearly"><a
    class="nav"
    >
    href=""> Yearly  </a>  </cfif>
    > 41 : <cfif showList IS NOT "complete"><a
    class="nav"
    >
    href=""> Complete  </a>  </cfif>
    > 42 : <cfif showList IS NOT "wish"><a
    class="nav" href=""> Wish
    >
    List  </a>  </cfif>
    >
    >
    > CODE.........
    >
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml">
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    > <title>2onboard.com - Kevin's Korner - Book
    List</title>
    >
    > <!--- SET DEFAULT VARIABLES --->
    > <cfparam name="showList" default="complete">
    > <cfparam name="showOrder" default="title">
    > <cfparam name="showStatus" default="own">
    >
    > <!--- QUERIES --->
    > <cfquery name="showList" datasource="2onboard">
    > SELECT
    title,author,status,completed,pages,queue,rating,cover,series,book,link
    > FROM books
    > WHERE status = '#showStatus#'
    > ORDER BY '#showOrder#'
    > </cfquery>
    >
    > </head>
    >
    > <body>
    >
    > <div id="container"> <!--- GRAY ALL ENCOMPASING
    BOX --->
    > <cfinclude template="header.cfm"> <!--- HEADER
    --->
    > <cfinclude template="explanation.cfm"> <!---
    EXPLANITION OF SCREEN BOX --->
    >
    > <div class="raised"> <!--- CONTENT OF - HOME
    PAGE --->
    > <b class="top"><b class="b1"><b
    class="b2"><b class="b3"><b
    > class="b4">
    > <div class="boxcontent">
    > <div class="boxcontenttext">
    > <table cellspacing="0">
    > <tr>
    > <td><span class="title">Kevin's
    Korner</span>
    - Reading</td>
    > <td colspan="5"
    align="right"><cfoutput> Library contains
    >
    #showList.recordCount# books</cfoutput></td>
    > </tr>
    > <tr><td colspan="6"><span
    class="spacetext"> </span></td></tr>
    > <tr>
    > <td colspan="6">
    > <cfif showList IS NOT "yearly"><a class="nav"
    >
    href=""> Yearly  </a>  </cfif>
    > <cfif showList IS NOT "complete"><a class="nav"
    >
    href=""> Complete  </a>  </cfif>
    > <cfif showList IS NOT "wish"><a class="nav"
    href=""> Wish
    >
    List  </a>  </cfif>
    > </td>
    >
    > CODE CONTINUES ON FROM HERE?.
    >
    > BUT, if I take just the bare minimum and test it as the
    following, it works
    > fine - WHY?
    >
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml">
    >
    > <cfparam name="showList" default="complete">
    >
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    > <title> </title>
    > </head>
    >
    > <body>
    >
    > <cfif showList IS NOT "yearly"><a class="nav"
    >
    href=""> Yearly  </a>  </cfif>
    > <cfif showList IS NOT "complete"><a class="nav"
    >
    href=""> Complete  </a>  </cfif>
    > <cfif showList IS NOT "wish"><a class="nav"
    href=""> Wish
    >
    List  </a>  </cfif>
    >
    > </body>
    >
    >
    >

  • CF Set form.variable for query and Next/Previous pages error

    I have a CF form with a select that posts to a CF "action" page.
    On the action page I: CFSET ItemNumber=#form.ItemNumber#
    I CFOUTPUT the 'ItemNumber' into the CFQUERY (which is an Inner Join dependant on the '#ItemNumber#')...
    All of the above works just fine and displays the database fields in color alternating rows, per the rest of the code.
    Here's the problem:
    I'm displaying 40 rows on a page per "Next and Previous" code. (CFPARAM name="start" default="1" and CFPARAM name="disp" default="40" along with the rest of the NextN code in the header and body). This does display 40 rows on the page and puts a link at the bottom of the page "Next 40 Rows", etc.
    Note: I'm only querying the database once and using the query (query name="data") to populate the table rows And the NextN code (CFOUTPUT name="data") And (CFIF start + disp GREATER THAN data.RecordCount, etc)...
    The problem happens when you click the "Next 40 Rows" link to display the 2nd page of rows. Since (I'm assuming) this NextN code is 're-reading' the same page from top to bottom, an error is thrown when the code tries to read the CFSET ItemNumber=#form.ItemNumber# at the top of the page.
    With the #form.ItemNumber# on this action page Originally coming from the previous posting of the form to this action page, when the "Next 40 Rows" link is clicked and the NextN code re-reads this action page - the CFSET ItemNumber (#form.ItemNumber) is not getting populated and throws the error...
    I hope I've not made this sound confusing.
    I can get the NextN code to work when I'm just querying the database without "flying in" a form variable. But when I CFSET a variable (#form.ItemNumber#) that is inserted into the query, the second page of the NextN throws an error and doesn't display.
    I would include the page code here but it would be fairly lengthy and, as well, the NextN code is a 'standard' CF code -- I've narrowed the problem down to the above "Element is undefined" (when the page tries to reload from the "Next 40 Rows" link) and am hoping there's a simple fix or another way to display the records in Next and Previous pages.
    Thanks to anyone in advance for shedding light on this.
    - e

    Thank you for the reply, Owain.
    Yes - The Next/Previous at the bottom of the page are hyperlinks.
    <a href="ThisPage.cfm?start=#Evaluate("start + disp")#">
    The following is at the top of the page (and is the variable from the form that I CFOUTPUT in the query):
    <cfparam name="ItemNumberDropdown01" default="">
    <cfset ItemNumber = #form.ItemNumberDropdown01#>
    The error report showed that the "Next Page" hyperlink was reading an undefined variable... although when the "action page" first opens from the form posting to it, it populates the CFSET just fine (per the cfparam and cfset above)... As you mention, the hyperlink clearing the form scope is what causes the error in trying to display the next set of records...
    The form page and the 'action page' are both secure pages with an application page setting the session, etc. Am I at risk in using an URL scope?
    Where would this URL scope be put? (The href is shown above - would the URL scope go in this? - How would this be written?)
    The CFPARAM and CFSET would still exist at the top of the 'action page' and still throw an error wouldn't it or would this be replaced with something else to read the form.variable for this 'first' action page to be displayed?
    Thanks again for the 'education' on this...
    - ed

Maybe you are looking for

  • Odbc driver error while connecting with Oracle BI in Linux

    I have Oracle BI Server, Presentation Service and Oracle 11g Client installed in RHEL 5. Oracle BI client is installed in Windows so that I can use Admin tool. I have created a repository in Windows for sh schema(by creating ODBC). After that I trans

  • ODI 11g link editor problem

    Hi I have recently upgraded to ODI 11g from ODI 10g. In ODI 11g when we are clicking on the Link Editor option it is throwing following error. ODI-20344 Cannot Launch the editor for this expression sun.awt.X11.XException: Cannot write XdndAware prope

  • I cannot find my receipt for my ipod how can i prove it isnt a year old

    I cannot find my receipt for my ipod and its under a year old how can i prove this

  • Calculation based on two result columns in combined report

    Hi all - I have a combined analysis and I need to add a result column based on two of my result columns. The calculation involves one column from my first report and one column from my second report. The first report has # of opportunities and my sec

  • Transport way - house banks(fi12)

    Dear export, I tried to transport the house banks(FI12) from DEV  to QAS. Table view -> Transport However, the house banks was not changed on QAS system. So I directly edit it on QAS. Is there anyway I can transport House Banks using a transport mana