Type mismatch in assignment statement

Hi all,
Here my problem
tcrComp1.method = method.selectedItem;
In the left side::
tcrComp1: an object of type TCRComponents
method : is an attribute of type String
In the right side::
method : is a comboBox that includes an array of Strings like
<mx:ComboBox id="method" width="50">
<mx
ataProvider>
<mx:Array>
<mx:String>post</mx:String>
<mx:String>get</mx:String>
</mx:Array>
</mx
ataProvider>
</mx:ComboBox>
I have tried to do the following
tcrComp1.method = String(method.selectedItem);
tcrComp1.method = method.selectedItem.toString;
tcrComp1.method = (String)method.selectedItem;
But all of them fail.
Where is the problem.? and how can I fix it?
Thanks in advance

Is this in Flex 1.5 or Flex 2?
For flex 2 try the following code sample.

Similar Messages

  • Weird type mismatch

    The problem is the following:
    I've created two classes, one called Corpo and another called
    KeyManager.
    The Corpo class is a body in a game, like a rock, a tree, the
    character, etc...
    The KeyManager class manages all the key inputs and passes
    the action associated to the key pressed to the object of the class
    Corpo (further, i'll create a subclass of Corpo named Char or sth
    like that, cuz just a char receive actions from keyboard)
    so, the class KeyManager is created this way:
    var km:KeyManager=new KeyManager(target);
    where target is the Corpo object that will be associated to
    the km
    i'm using strong typing so the "target" is an object of the
    Corpo class
    but, inside KM class, occurs an error
    i try to put the "target" reference onto a variable
    predefined, as shown at the end of the message:
    and then i compile, it returns:
    Type mismatch in assignment statement: found Corpo where
    String is required.
    _TARGET=alvo
    i've tried a lot and didn't find a solution
    sorry if i've been so extensive
    thks since now

    I've tried that too.
    The return:
    **Error** C:\Documents and Settings\Bruno
    Martins\Desktop\teste em flash\KeyManager.as: Line 9: Type mismatch
    in assignment statement: found Corpo where String is required.
    _TARGET=new Corpo();
    **Error** C:\Documents and Settings\Bruno
    Martins\Desktop\teste em flash\KeyManager.as: Line 10: Type
    mismatch in assignment statement: found Corpo where String is
    required.
    _TARGET=alvo
    Total ActionScript Errors: 2 Reported Errors: 2
    I don't know why the type of _TARGET returns String. Is this
    the default?

  • SQL Insert Statement Data Type Mismatch Error

    I am doing a very simple web application that has a Microsoft Access database as the data source. I have been able to sucessfully create update and query statements using parameters but am having issues with an insert statement. I am using JSTL 1.1.2
    The following code creates the data type mismatch error.
    <sql:update
         sql="insert into tblTtoF(TFToolID,TFFeatID) values(?,?)">
            <sql:param value='$(ID}'/>
         <sql:param value='${feature}'/>
            </sql:update>The table has NUMBER as the data type for both of these fields and the variables I am feeding into it are both numbers. If I hard code the first number into the sql statement then it works. I have tried swapping the variables around and as long as the first one is hard coded the parameter for the second one works no matter which is first or second.
    However I can get the following code to work, which of course leaves me vulnerable to sql injection attacks which is not really a good thing.
    <sql:update>
         insert into tblTtoF(TFToolID,TFFeatID) values('<c:out value="${ID}"/>','<c:out value="${feature}"/>')
            </sql:update>So I am just looking for any suggestions as to why my first piece of code doesn't work seeing as it is the simplest of SQL statements and the most standard syntax.
    Thanks

    I changed it to the following
         <c:set var="featurenew" value="${0 + feature}"/>
         <c:set var="IDnew" value="${0 + param.toolID}"/>
              <sql:update
              sql="insert into tblTtoF(TFToolID,TFFeatID) values(?,?)">
              <sql:param value='$(IDnew}'/>
              <sql:param value='${featurenew}'/>
              </sql:update>And got the following error in the localhost.log
    31/07/2006 09:31:41 org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.sql.SQLException: SQL Exception : [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented
         at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setObject(JdbcOdbcPreparedStatement.java:1437)
         at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setObject(JdbcOdbcPreparedStatement.java:1072)
         at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setObject(JdbcOdbcPreparedStatement.java:1063)
         at org.apache.taglibs.standard.tag.common.sql.UpdateTagSupport.setParameters(UpdateTagSupport.java:254)
         at org.apache.taglibs.standard.tag.common.sql.UpdateTagSupport.doEndTag(UpdateTagSupport.java:156)
         at org.apache.jsp.dataUpdated_jsp._jspx_meth_sql_update_1(dataUpdated_jsp.java:975)
         at org.apache.jsp.dataUpdated_jsp._jspx_meth_c_if_0(dataUpdated_jsp.java:879)
         at org.apache.jsp.dataUpdated_jsp._jspx_meth_c_forEach_0(dataUpdated_jsp.java:680)
         at org.apache.jsp.dataUpdated_jsp._jspService(dataUpdated_jsp.java:151)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:833)
         at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639)
         at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
         at java.lang.Thread.run(Thread.java:595)
    I have also tried the following in the past with no luck
    <fmt:parseNumber value="${ID}" type="number" var="IDnew"/>
    AND......
    <sql:query
       sql="select TFToolID from tblTtoF where TFToolID = ?"
       var="toolresults">
       <sql:param value="${ID}"/>
    </sql:query>
    <c:forEach var="getID" items="${toolresults.rows}">
         <c:set var="theID" value="${getID.TFToolID}"/>
    </c:forEach>
    AND when that didn't work, added this....
    <fmt:parseNumber value="${theID}" var="IDnew"/>

  • Type mismatch errors in 10g

    I have migrated an 8i database to 10g 10.2.0.3. I am getting a compile error on a procedure which is now INVALID referencing a package which compiles ok and is VALID. The compile error I get on the procedure is:
    PLS-00386: type mismatch found at 'PIO_TBLMVR' between FETCH cursor and INTO variables.
    The into variables are below. The fetch cursor is trying to fetch a NULL into a BOOLEAN using the definition of the record below.
    TYPE r_MasterRecord IS RECORD (
    v_bMVR_DuplicateDriver BOOLEAN,
    v_bWPC_Match BOOLEAN);
    This is the select statement for the CURSOR:
    SELECT NULL, NULL
    FROM mvr_report r;
    If I change the BOOLEAN to a NUMBER it works. What am I doing wrong or can't I do this in 10g??

    It is not true.
    Boolean variable can be assigned a value NULL in pl sql.
    The compile error is due to usage of boolean type in the select statement, because SQL doesn't support a boolean type.
    The fact, that it worked in 8i ( can't test actually) is probably due to weak/wrong type tests
    which was corrected in newer release.
    Best regards
    Maxim

  • Data type mismatch when inserting into text field

    Hello all,
    Using VB script and ASP.
    I have a page that inserts into a field (casenum) in a table (clientsw) in a database. The field (casenum) in the table is data type TEXT :
    I create a recordset and then an insert statement which the following is part of:
    Code to insert the casenum into the field
    rsClients("Casenum")=Right(Date(),2) & "E-100" & rsCasenumber("countervalue")
    It inserts a number like 09E-1004500
    I then have code that takes that string and passes it to the next page as a variable
    Session("UserID")=rsClients("CASENUM")
    response.redirect "done3.asp"
    When it gets to the next page it is assigned as UserID
    Dim svuserid
    svuserid = "0"
    if (Session("UserID") <> "") then svuserid = Session("UserID")
    %>
    My information inserts into the database exactly as I want it, but when it gets to the next page I get an error that is displayed that says the following:
    Microsoft JET Database Engine error '80040e07'
    Data type mismatch in criteria expression.
    /done3.asp, line 16
    My code on the second page is as follows:
    <%@LANGUAGE="VBSCRIPT"%>
    <!--#include file="Connections/connNewdatabase1.asp" -->
    <%
    Dim svuserid
    svuserid = "0"
    if (Session("UserID") <> "") then svuserid = Session("UserID")
    %>
    <%
    set rsClients = Server.CreateObject("ADODB.Recordset")
    rsClients.ActiveConnection = MM_connNewdatabase_STRING
    rsClients.Source = "SELECT *  FROM CLIENTSW WHERE CASENUM=" + Replace(svuserid, "'", "''") + "  ORDER BY CASENUM"
    rsClients.CursorType = 0
    rsClients.CursorLocation = 2
    rsClients.LockType = 3
    rsClients.Open()
    rsClients_numRows = 0
    %>
    Line 16 is the one that says rsClients.Open()
    If I take the concatenation out of rsClients("Casenum")=Right(Date(),2) & "E-100" & rsCasenumber("countervalue") and have only rsClients("Casenum")=rsCasenumber("countervalue") and change the table field to number, I don't get the "datatype mismatch error"
    What do I change to enable me to leave the above statement concatenated and insert into the table correctly and complete the stuff on the next page?

    >This is an access database, varchar is not an option for a datatype.
    Sorry. In another thread I thought you mentioned using SQL Server
    >I changed the + signed to ampersands instead and it doesn't make a difference.
    I didn't think that was the problem. I was just pointing out that it's a bad practice. If you use the '+' on two strings that can evaluate as numeric, it will actually add rather than concat them.

  • Data type mismatch problem

    Hello:
    I have an sql query that works just fine when I run it
    directly in Access but when I run it on a web site, it gives me an
    error "Data type mismatch in criteria expression".
    I am working with transactions and this is an update of a
    table within a transaction.
    Here is the code:
    con.execute "UPDATE tblWells SET API_Number='" &
    Request.Form("API_Number") & "', Well_Name='" &
    Request.Form("Well_Name") & "', Drill='" &
    Request.Form("Drill") & "', Reenter='" &
    Request.Form("Reenter") & "', horizontal='" &
    Request.Form("horizontal")& "', Duration='" &
    Request.Form("Duration") & "', OilWell='" &
    Request.Form("OilWell") & "', GasWell='" &
    Request.Form("GasWell") & "', Other='" &
    Request.Form("Other") & "', SingleZone='" &
    Request.Form("SingleZone") & "', MultipleZone='" &
    Request.Form("MultipleZone")& "', NumAcresLease='" &
    Request.Form("NumAcresLease") & "', LeaseSerialNumber='" &
    Request.Form("LeaseSerialNumber") & "', LeaseName='" &
    Request.Form("LeaseName") & "', WellNumber='" &
    Request.Form("WellNumber") & "', state='" &
    Request.Form("state") & "', county='" &
    Request.Form("county") & "', wellheadElevation='" &
    Request.Form("wellheadElevation") & "', groundElevation='"
    & Request.Form("groundElevation") & "', ProposedDepth='"
    & Request.Form("ProposedDepth") & "',
    DistanceTownPostOffice='" &
    Request.Form("DistanceTownPostOffice") & "',
    DirectionTownPostOffice='" &
    Request.Form("DirectionTownPostOffice") & "',
    Distance_Nearest_Property_Line='" &
    Request.Form("Distance_Nearest_Property_Line") & "',
    DistanceNearestWell='" & Request.Form("DistanceNearestWell")
    & "', UnitSpacing='" & Request.Form("UnitSpacing") & "'
    WHERE WellID=1"
    I can't figure why the query would work fine in Access and
    not on the webpage.
    Thanks.

    A Checkbox does not exist as a form value if it empty which
    is why your SQL
    script is failing. What you need to do is create a variable
    and then assign
    it with the value. Assuming you are using ASP then taking one
    element on
    your SQL statement
    SingleZone='" & Request.Form("SingleZone")
    you would change it to
    SingleZone = strSingleZone
    Above the actual start of your SQL statement you would define
    your variables
    and set their empty values, and then assign them to the form
    values
    Dim strSingleZone = 0
    if Request.Form("SingleZone") <> "" then
    strSingleZone = Request.Form("SingleZone")
    End if
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "zavidp" <[email protected]> wrote in
    message
    news:eo9554$dd0$[email protected]..
    > Okay, I have worked further. I have isolated the fields
    that are causing
    > trouble and they are checkbox fields.
    >
    > I have been pulling my hair out all day trying to figure
    out how to set
    > access
    > and asp so that the on/off, true/false or whatever is
    passed correctly.
    >
    > Can anyone help?
    >
    > Dave
    >

  • Type conflict with ASSIGN in assoc with CL_ABAP_TABLEDESCR

    Hello Xperts,
    over the functionalities within CL_ABAP_TABLEDESCR I have added two fields to an ITAB.
      "thismanpo   type  /bic/oiblmansec1,
      gs_comp-name  = 'THISMANPO'.
      gs_element ?= cl_abap_elemdescr=>describe_by_name( '/bic/oiblmansec1' ).
      gs_comp-type ?= cl_abap_elemdescr=>get_p( p_length = gs_element->length
                                      p_decimals = gs_element->decimals ).
      APPEND gs_comp TO gt_components.
    So far so good. Furthermore I have declared the following:
      field-symbols:
        <f_thismanpo_ref>       type  /bic/oiblmansec1,
    The problem occurs at the statement:
        assign component:
          'THISMANPO'  of structure <f_ref_data> to <f_thismanpo_ref>,
    >ASSIGN_TYPE_CONFLICT
    > You attempted to assign a field to a typed field symbol,
    > but the field does not have the required type.
    The other field (which works fine!!!):
      "thiscostpo  type  /bic/oiblcopem1
      gs_comp-name  = 'THISCOSTPO'.
      gs_element ?= cl_abap_elemdescr=>describe_by_name( '/bic/oiblcopem1' ).
      gs_comp-type ?= cl_abap_elemdescr=>get_p( p_length = gs_element->length
                                      p_decimals = gs_element->decimals ).
      APPEND gs_comp TO gt_components.
      field-symbols:
        <f_thiscostpo_ref>      type  /bic/oiblcopem1,
        assign component:
          'THISCOSTPO' of structure <f_ref_data> to <f_thiscostpo_ref>,
    The difference between the two fields is:
    /bic/oiblcopem1 is CURR DEC 17 2
    /bic/oiblmansec1 is FLTP 16 16
    I have also tried:
          'THISMANPO'  of structure <f_ref_data> to <f_thismanpo_ref> CASTING,
    but then get the dump:
    > In the current program "ZCL_RSPLF_CCM_CALIB_CALC======CP", an error occurred
    > when setting the
    >field symbol "<F_THISMANPO_REF>" with ASSIGN or ASSIGNING (maybe in the
    > combination with
    > the CASTING addition).
    >
    >When converting the base entry of the field symbol "<F_THISMANPO_REF>" (number
    > in base
    >table: 34334), it was found that the target type requests a memory
    >alignment of 8.
    >
    >However, the source data object has an invalid memory alignment, that is
    > an alignment not divisible by 8.

    Since /bic/oiblmansec1 is Floating, you need to use the method GET_F, not GET_P
    " /bic/oiblmansec1 is FLTP 16 16
    gs_element ?= cl_abap_elemdescr=>describe_by_name( '/bic/oiblmansec1' ).
    gs_comp-type ?= cl_abap_elemdescr=>get_F( ).
    Regards,
    Naimesh Patel

  • Getting Type Mismatch Error while passing Array of Interfaces from C#(VSTO) to VBA through IDispatch interface

    Hi,
    I am facing issues like Type Mismatch while passing Array of interfaces from .NET  to VBA and vice versa using VSTO technology.
    My requirement is that ComInterfaceType needs to be InterfaceIsIDispatch.
    My Interface definition is somewhat like this
        [ComVisible(true)]
        [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
        [Guid("AAF48FBC-52B6-4179-A8D2-944D7FBF264E")]
        public interface IInterface1
            [DispId(0)]
            IInterface2[] GetObj();
            [DispId(1)]
            void SetObj(ref IInterface2[] obj);
        [ComVisible(true)]
        [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
        [Guid("CDC06E1D-FE8C-477E-97F1-604B73EF868F")]
        public interface IInterface2
    IF i am passing array of above interface (created in C#.Net) to VBA using GetObj API,i am getting type mismatch error in VBA while assigning the value to variable in VBA.Even assigning to variant type variable gives TypeMismatch.
    Also while passing Array of interfaces from VBA using SetObj API,excel crashes and sometimes it says method doesn't exists.
    Kindly provide some assistance regarding the same.
    Thanks

    Hi,
    I am facing issues like Type Mismatch while passing Array of interfaces from .NET  to VBA and vice versa using VSTO technology.
    My requirement is that ComInterfaceType needs to be InterfaceIsIDispatch.
    My Interface definition is somewhat like this
        [ComVisible(true)]
        [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
        [Guid("AAF48FBC-52B6-4179-A8D2-944D7FBF264E")]
        public interface IInterface1
            [DispId(0)]
            IInterface2[] GetObj();
            [DispId(1)]
            void SetObj(ref IInterface2[] obj);
        [ComVisible(true)]
        [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
        [Guid("CDC06E1D-FE8C-477E-97F1-604B73EF868F")]
        public interface IInterface2
    IF i am passing array of above interface (created in C#.Net) to VBA using GetObj API,i am getting type mismatch error in VBA while assigning the value to variable in VBA.Even assigning to variant type variable gives TypeMismatch.
    Also while passing Array of interfaces from VBA using SetObj API,excel crashes and sometimes it says method doesn't exists.
    Kindly provide some assistance regarding the same.
    Thanks

  • Type mismatch when calling gui_download

    Hello experts
    i written a test gui upload and downlaod program . program gives run time error  saying type mismatch in function call gui_download  .
    REPORT  ZCR_UPLOAD_DOWNLOAD .
    TABLES: SSCRFIELDS.
    TYPES:  BEGIN OF TY_STUDENT,
            ID TYPE ZSTUDENTDATA1-ID,
            NAME TYPE ZSTUDENTDATA1-NAME,
            COURSE TYPE ZSTUDENTDATA1-COURSE,
            DOJ TYPE ZSTUDENTDATA1-DOJ,
            ADDRESS TYPE ZSTUDENTDATA1-ADDRESS,
            END OF TY_STUDENT.
    DATA : IT_STUDENT TYPE TABLE OF TY_STUDENT,
           WA_STUDENT TYPE TY_STUDENT.
    DATA : FILE_NAME TYPE IBIPPARMS-PATH.
    selection-screen BEGIN OF BLOCK BK1 WITH FRAME TITLE TXT-001.
    PARAMETERS : P_FILE(30) TYPE C.
    PARAMETERS: UPLOAD RADIOBUTTON GROUP rad  DEFAULT 'X',
                DOWNLOAD RADIOBUTTON GROUP rad.
    SELECTION-SCREEN END OF BLOCK BK1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    FILE_NAME = P_FILE.
    CALL FUNCTION 'F4_FILENAME'
    * EXPORTING
    *   PROGRAM_NAME        = SYST-CPROG
    *   DYNPRO_NUMBER       = SYST-DYNNR
    *   FIELD_NAME          = ' '
    IMPORTING
       FILE_NAME           = FILE_NAME.
    START-OF-SELECTION.
    IF UPLOAD = 'X'.
    PERFORM GUI_UPLOAD.
    ELSE.
    PERFORM DATA_RETRIEVE.
    PERFORM GUI_DOWNLOAD.
    ENDIF.
    FORM GUI_UPLOAD .
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = FILE_NAME
       FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = '#'
    *   HEADER_LENGTH                 = 0
    *   READ_BY_LINE                  = 'X'
    *   DAT_MODE                      = ' '
    * IMPORTING
    *   FILELENGTH                    =
    *   HEADER                        =
      TABLES
        DATA_TAB                      = IT_STUDENT
    * EXCEPTIONS
    *   FILE_OPEN_ERROR               = 1
    *   FILE_READ_ERROR               = 2
    *   NO_BATCH                      = 3
    *   GUI_REFUSE_FILETRANSFER       = 4
    *   INVALID_TYPE                  = 5
    *   NO_AUTHORITY                  = 6
    *   UNKNOWN_ERROR                 = 7
    *   BAD_DATA_FORMAT               = 8
    *   HEADER_NOT_ALLOWED            = 9
    *   SEPARATOR_NOT_ALLOWED         = 10
    *   HEADER_TOO_LONG               = 11
    *   UNKNOWN_DP_ERROR              = 12
    *   ACCESS_DENIED                 = 13
    *   DP_OUT_OF_MEMORY              = 14
    *   DISK_FULL                     = 15
    *   DP_TIMEOUT                    = 16
    *   OTHERS                        = 17
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    UPDATE ZSTUDENTDATA1 FROM TABLE IT_STUDENT.
    ENDFORM.                    " GUI_UPLOAD
    FORM DATA_RETRIEVE .
        SELECT ID
               NAME
               COURSE
               DOJ
               ADDRESS
               INTO TABLE IT_STUDENT FROM ZSTUDENTDATA1.
    ENDFORM.                    " DATA_RETRIEVE

    Hello sir
    Thanks for quick response.
    At first i declared same data type as filename field of FM f4_filename so i declare
    DATA : FILE_NAME TYPE IBIPPARMS-PATH.
    at selection screen the data type is
    PARAMETERS : P_FILE(30) TYPE C.
    then i assigned to FILE_NAME
    NOW i am assignig  field  FILENAME   of gui_download  to it but the data type of filename is string . should i covert the type of
    FILE_NAME TO STRING BEFORE ASSIGNING THE VALUE PLEASE SUGGEST.
    THANKS IN ADVANCE
    CHITTA RANJAN MAHATO

  • Error in assign statement

    Hi
    I am getting dump in following assign statement
        assign src+fields_int-offset_src(fields_int-length_src)
             to <f> type fields_int-type .
    Error description:
    The field symbol is no longer assigned because there was an attempt
    makde previously in a Unicode program to set the field symbol using
    ASSIGN with offset and/or length specification. Here, the memory   
    addressed by the offset/length specification was not within the    
    allowed area.                                                      
    Please help

    Also the dump desc is
    GETWA_NOT_ASSIGNED_RANGE

  • Data type mismatch in criteria expression

    When i execute a sql i get the following message:
    java.sql.QDLExeption.......Data type mismatch in criteria expression...
    I use MS access.
    I use java.sql.Date to this format 04-09-2003
    I use boolean
    Is the date format correct?
    Is the boolean format correct?
    I try to debug for 3 hours and i didn't succeed..
    Thanks for any responses

    Try a couple of things:
    (1) Make sure that your Access database column type is Date for the columns you think it should be. Should the boolean column be type yes/no in Access? I'm not 100% sure, but that's my guess.
    (2) Use PreparedStatement, not Statement, if you aren't already. Set the variable values in your SQL using the setXXX() methods in PreparedStatement. That will make sure that all conversions are done properly.
    MOD

  • ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence

    Hi ,
    I executed the below query in database version 11.2.0.3.0, it throws the error like "ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence"
    with PAYMENT_XML as (
          select XMLTYPE(
            '<Document>
            <pain.002.001.02>
                <GrpHdr>
                      <MsgId>CITIBANK/20091204-PSR/4274</MsgId>
                      <CreDtTm>2009-12-04T09:36:00</CreDtTm>
               </GrpHdr>
                <OrgnlGrpInfAndSts>
                <OrgnlMsgId>10002</OrgnlMsgId>
                <OrgnlMsgNmId>pain.001.001.02</OrgnlMsgNmId>
                <OrgnlNbOfTxs>20</OrgnlNbOfTxs>
                <OrgnlCtrlSum>7000</OrgnlCtrlSum>
                <GrpSts>PART</GrpSts>
                <StsRsnInf>
                  <AddtlStsRsnInf>ACK - FILE PARTIALLY SUCCESSFUL</AddtlStsRsnInf>
                </StsRsnInf>
              </OrgnlGrpInfAndSts>
              <OrgnlGrpInfAndSts>
                <OrgnlMsgId>10001</OrgnlMsgId>
                <OrgnlMsgNmId>pain.001.001.02</OrgnlMsgNmId>
                <OrgnlNbOfTxs>202</OrgnlNbOfTxs>
                <OrgnlCtrlSum>9000</OrgnlCtrlSum>
                <GrpSts>PART</GrpSts>
                <StsRsnInf>
                  <AddtlStsRsnInf>ACK - FILE PARTIALLY SUCCESSFUL</AddtlStsRsnInf>
                  <AddtlStsRsnInf>Formated</AddtlStsRsnInf>
                </StsRsnInf>
              </OrgnlGrpInfAndSts>
          </pain.002.001.02>
      </Document>') as OBJECT_VALUE1
       from dual
      select R.*
      from PAYMENT_XML,
           XMLTABLE(
           'for $COMP in $COMPANY/Document/pain.002.001.02
              for $DEPT at $DEPTIDX in $COMP/OrgnlGrpInfAndSts
               return <RESULT>
                        <NAME>{fn:data($COMP/GrpHdr/MsgId)}</NAME>
                          $DEPT/OrgnlMsgId,
                          $DEPT/OrgnlNbOfTxs,
                          $DEPT/OrgnlCtrlSum,
                          $DEPT/GrpSts,
                          $DEPT/StsRsnInf/AddtlStsRsnInf
                      </RESULT>'
           passing OBJECT_VALUE1 as "COMPANY"
           columns
             NAME            VARCHAR(10)  path 'NAME',
             OrgnlMsgId      VARCHAR2(24) path 'OrgnlMsgId',
             ORGNLNBOFTXS    VARCHAR2(24) path 'OrgnlNbOfTxs',
             ORGNLCTRLSUM    NUMBER       path 'OrgnlCtrlSum',
             GRPSTS          VARCHAR2(24) path 'GrpSts',
             ADDTLSTSRSNINF  VARCHAR2(40) path 'AddtlStsRsnInf'
         ) r
    Errors comes this part :
                <StsRsnInf>
                  <AddtlStsRsnInf>ACK - FILE PARTIALLY SUCCESSFUL</AddtlStsRsnInf>
                  <AddtlStsRsnInf>Formated</AddtlStsRsnInf>
                </StsRsnInf>
    if i put the single statement for this xml element <AddtlStsRsnInf> it works fine if more than one element comes it raised the error.
    i want the output like the below format : want to merge the element value with (, comma)  delimiter with single coloumn value
    NAME
    ORGNLMSGID
    ORGNLNBOFTXS
    ORGNLCTRLSUM
    GRPSTS
    ADDTLSTSRSNINF
    CITIBANK/2
    10002
    20
    7,000
    PART
    ACK - FILE PARTIALLY SUCCESSFUL
    CITIBANK/2
    10001
    202
    9,000
    PART
    ACK - FILE PARTIALLY SUCCESSFUL, Formated
    Thanks is advance for reply
    Thanks,
    Chidam

    Try with XQuery string-join() function :
    ADDTLSTSRSNINF  VARCHAR2(40) path 'string-join(AddtlStsRsnInf, ", ")'

  • Unbounded wildcard type: type mismatch error

    I have a problem with Generics which to me seems to be caused by type erasure and necessary reification, but I can't find a solution.
    In order to keep the problem simple I've removed all unnecessary functions from the code and just made sure it still compiles - the only method that does not compile (and kept its whole code) is the method processContents() that causes my problem.
    I hope that the code is self-explanatory enough without comments.
    public interface Iterator<T> {
         public T next();
         public boolean hasNext();
    public interface FunctionInterface<T> {
         T apply(T argument);
    public class DataStructure<T> {
         private T content;
         public DataStructure(T content) {
              this.content = content;
         public T get() {
              return content;
         public Iterator<DataStructure<T>> contents() {
              return new Iterator<DataStructure<T>>() {
                   @Override
                   public boolean hasNext() {
                        return false;
                   @Override
                   public DataStructure<T> next() {
                        return null;
    }The problem is caused in the methode processContents() of the methode SubDataStructure, a sub-class of DataStructure.
    public class SubDataStructure<T extends FunctionInterface<? super T>> extends
              DataStructure<T> implements FunctionInterface<SubDataStructure<T>> {
         public SubDataStructure(T content) {
              super(content);
         public T processContents() {
              Iterator<DataStructure<T>> iter = contents();
              T value = get();
              while (iter.hasNext()) {
                   T otherValue = iter.next().get();
                   // following line causes ERROR: Type mismatch: cannot convert from
                   // capture#1-of ? super T to T ReducedDataStructure.java
                   value = value.apply(otherValue);
              return this.get();
         @Override
         public SubDataStructure<T> apply(SubDataStructure<T> argument) {
              // arbitrary action
              return argument;
    }As you see the commented line causes an error saying "Type mismatch: cannot convert from capture#1-of ? super T to T ReducedDataStructure.java" - from my understanding the type should be correct but got lost at compile-time, but would have to be restored at run-time. If so, a type-cast should solve the problem, but I'd prefer to find a clean solution without unchecked casts.
    I've tried to find an answer in various books and the linked FAQ, but haven't found it yet - I admit that after a few hours of trying I got a bit frustrated, so I hope that this is a more common problem to developers and that somebody might be able to help. Any suggestions how do solve this problem? I'd be grateful for your answers.
    Bob
    Edited by: RobertSingleton on Nov 23, 2009 2:17 PM
    Edited by: RobertSingleton on Nov 23, 2009 2:21 PM

    RobertSingleton wrote:
    jtahlborn wrote:
    you have defined T to have a lower bound of "FunctionInterface<? super T>", value is of the type T, therefore the return type of value.apply (which comes from FunctionInterface) is "? super T". a value of "? super T" returned from the "apply" method cannot be re-assigned to "value", which has type T.Thanks, but I understood it so far. The question to me is, whether it is possible to solve the problem as shown here.
    are you sure you don't want the class typedef to be "T extends FunctionInterface<? extends T>"?Yes, but would you have other suggestions? DataStructure manages Objects, SubDataStructure adds a few new methods, FunctionInterface is an Interface like Comparable. Maybe that's a bit too general to see whether the current solution is appropriate or not. But no matter how the a better solution would look like, I'd be very curious how to solve the problem in its current settings, since I'm positive I could apply the solution in the future to different problems with the same cause.the problem is that you have defined FunctionInterface in this case to return anything up to Object (? super T). "super" is good for saying "give me an object which can handle this type or any of its parent types". it's generally not so good for a return type, as you are essentially saying "i can return anything here". you want to repeatedly apply FunctionInterface, but your definition allows you to return something which may not implement FunctionInterface. so, you code cannot work with your current definitions. without having a better understanding of what you are trying to do, i can't really put forward any meaningful suggestions for fixing the code.

  • ASSIGN_REFERENCE_EXPECTED    error in assign statement.

    hi all,
    Iam upgrading the system from ecc4.6c to 6.0
    igot a dump in the assign statement.
    this is the statement:
      assign src+fields_int-offset_src(fields_int-length_src)
             to <f> type fields_int-type
             decimals fields_int-decimals.
    it is giving the error at this statament.
    error analysis is :
    The first operand specified with ASSIGN has type "14" and is therefore   
    no data reference.                                                       
    will anyone solve this problem.

    hi,
    increase the field length of fields_int-type or make use of a different field which has length greater tha or equal to fields_int-length_src field length.
    Regards,
    Santosh

  • Moving internal table to another internal table using ASSIGN statement.

    Hi,
    We have a requirement to move an internal table form one program(SAPMV60A) to the internal table of the include(RV61B9xx) using the following statement.
    [  xvbrp is a internal table in SAPMV60A.  ]
    ASSIGN ('(SAPMV60A)xvbrp')  TO <ls_xvbrp>.
    We tried all the combinations for declaring <ls_xvbrp> as table.
    It is going to dump in our system,
    " Type conflict with ASSIGN in program "SAPLV61B ".".
    Your efforts will be rewarded with points.
    Thanks in Advance,
    Warm Regards,
    Baburaj

    Hi
    If you declare your field-symbols as table you should use []
    FIELD-SYMBOLS: <ls_xvbrp> TYPE TABLE.
    ASSIGN ('(SAPMV60A)xvbrp[]') TO <ls_xvbrp>.
    else
    FIELD-SYMBOLS: <ls_xvbrp> TYPE ANY.
    ASSIGN ('(SAPMV60A)xvbrp') TO <ls_xvbrp>.
    But I believe in this case you'll assign the header line of xvbrp.
    Max

Maybe you are looking for

  • Output to external monitor fail after few seconds

    hi i upgraded my x61+X6 utlrabse docking st. to X200 with X200 ultrabase docking station. i have a DELL  20 inch LCD as my external mointor. the docking statition is connected using a USB-KVM to the external monitor. with the X61 i manage to see the

  • Oracle HTTP Server Crash

    Hi all, i have an application deployed in OC4J, this application, due to dabase locks, its started to respond very slowly (i had some JSP with 102 seconds response time) about 12:50 i had 175 active connection in that OC4J container, some moments aft

  • USB for Audio Out

    I am looking at buying a Bose Companion speaker system. The Bose Companion Series 5 plays music through a USB connection. If I connect the speakers via USB on the Airport Express will it output audio through this connection via iTunes? Thanks, Mike

  • Why can't people view my email attachments?

    Hi, I regularly send out emails using Mail with JPEG attachments but many people cannot see them. They simply get the following type of code/jargon. What is going on and what is the solution? = --Apple-Mail-6--884313368 Content-Transfer-Encoding: bas

  • Dynamic Spellcheck formatting

    Hi, I'm working in an Institute for visually impaired children and one of our staffmember is also lightly visually impaired. When I activate the dynamic spellchecker, the "wrong" words appears underlined by a thin red line. Is it possible to change t