JPQL -Collection Member Expressions -type mismatch

I'm trying to run the query below but I get an error
Caused by: java.lang.IllegalArgumentException: You have attempted to set
a value of type class java.lang.String for parameter contid with expected type
of class mmis.entity.Contract from
query string SELECT c FROM Consultant c WHERE c.contractCollection IS EMPTY
OR :contid NOT MEMBER OF c.contractCollection .
public List<Consultant> getAvailableConsultants( String cntrctId) {
return em.createQuery("SELECT c FROM Consultant c"
+ " WHERE c.contractCollection IS EMPTY OR :contid NOT MEMBER OF c.contractCollection ")
.setParameter("contid", cntrctId)
.getResultList();
The collection is a result of a many-to-many relationship which i thought holds the contractIDs
how can i get the query to check whether the parameter contid is not in the collection
Thnx

Hi Amasoni, I think you might want to review the JPA persistence basics: http://docs.oracle.com/javaee/6/tutorial/doc/bnbtl.html (or probably Java basics). As pointed out by qimbal2, c.contractCollection refers to a collection of Contract object, hence you won't be able to simply cast it to get its id.
Instead if you want to find out Consultants with no contracts with exceptions of some contract ids, you can use joins as such:
select distinct c
from Consultant c
left outer join c.contractCollection o
where o is null
or (o is not null and o <> 3)

Similar Messages

  • Data type mismatch in criteria expression. What am I not seeing??

    Once again I'm stuck! I have included the query I'm trying to run below.  I have also indicated the data types of my fields.
    <cfquery name="qGetOrders" datasource="manna_premier">
    SELECT DISTINCT Count(ID) AS CountOfID,   - number
                                 TMName,   -text
                                 Sum(Quantity) AS SumOfQuantity,   - number
                                 Count(NewExisting) AS CountOfNewExisting -number
    FROM Users, Orders, ProductOrders
    WHERE SaleDate BETWEEN #CreateODBCDate(FORM.Start)# AND #CreateODBCDate(FORM.End)#
    GROUP BY UserZone, TMName
    </cfquery>
    When run it returns this error message....
    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
    The error occurred in D:\Inetpub\mannapremier\zvp_report2.cfm: line 11
    9 :                     Count(NewExisting) AS CountOfNewExisting
    10 : FROM Users, Orders, ProductOrders
    11 : WHERE SaleDate BETWEEN #CreateODBCDate(FORM.Start)# AND #CreateODBCDate(FORM.End)#
    12 : GROUP BY UserZone, TMName
    13 : </cfquery>
    SQLSTATE
      22018
    SQL
       SELECT DISTINCT Count(ID) AS CountOfID, TMName, Sum(Quantity) AS SumOfQuantity, Count(NewExisting) AS CountOfNewExisting FROM Users, Orders, ProductOrders WHERE SaleDate BETWEEN {d '2009-10-01'} AND {d '2009-10-31'} GROUP BY UserZone, TMName
    VENDORERRORCODE
      -3030
    DATASOURCE
      manna_premier
    I use the where clause on several other pages and it works. I don't understand where my data type is mismatched.
    Can anyone point me in the right direction?

    4) If you indeed need to select from the 3 tables Users,
    Orders, ProductOrders, then you should qualify the columns
    names like this, Users.ID, productOrders.Quantity, and so
    on.
    You also need to join on the related columns. If you forget to do that the resultset will be a massive cartesian table (huge number of records):
    rows in Table1 * #rows in Table2 * #rows in Table3

  • 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

  • Problems with "import from catalog" & "collection type mismatch"

    I'm attempting to keep 2 catalogs on 2 different computers sunchronized.  I'm exporting photos
    and collections (actually a web gallery) from one computer to another, and
    I'm getting a "collection type mismatch" error, that prevents the photos from being a
    dded to the collection.  I've exported and imported the flash gallery template
    from one system to the other to make sure the templates were identical.  A
    ll the photos, keywords, and attributes seem to be imported properly, but the photos aren't added
    to the collection. Anyone having success exporting/importing collections between computers?
    I'm using LR 2.7 on Win 7 & Vista.
    Thanks,
    Mark

    Thanks Dorin.  I tested it with a "regular" collection, and it works.
    I hope they fix this in v. 3 too!

  • Help its really urgent.....Data type mismatch in criteria expression.

    hello everyone....
    I m trying to retrive an int value from Access database with query
    String query = "SELECT * FROM M_PROCESS WHERE PROCESS_NAME = '"+selected_process+"' ";
    Here selected_process is the string retrived from a JSP page using request.getparameter and it may retrive value with multiple spaces in it.
    i m able to retrive selected_process correctlly but when i call another servlet method to execute query with statement
    ResultSet rs = dbcon.execQuery(query);
    I get an error
    Error in connection in execution[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
    can anyone help.....
    note: the datatype of PROCESS_NAME is TEXT . dbcon is the object of servlet connection manager which is responsible for connection establishment and query execution.

    Hi Nix,
    If its an Interger value use "+xxxx+" if string then use ' " ++"'
    or else try to convert the string value to interger...
    it will work

  • How can I fix a xquery resulting error ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence  - got multi-item sequence

    Hello,
    How can I improve the XQuery below in order to obtain a minimised return to escape from both errors ORA-19279 and ORA-01706?
    XQUERY for $book in  fn:collection("oradb:/HR/TB_XML")//article let $cont := $book/bdy  where  $cont   [ora:contains(text(), "(near((The,power,Love),10, TRUE))") > 0] return $book
    ERROR:
    ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence
    - got multi-item sequence
    XQUERY for $book in  fn:collection("oradb:/HR/TB_XML")//article let $cont := $book/bdy  where  $cont   [ora:contains(., "(near((The,power,Love),10, TRUE))") > 0] return $book//bdy
    /*ERROR:
    ORA-01706: user function result value was too large
    Regards,
    Daiane

    below query works for 1 iteration . but for multiple sets i am getting following error .
    When you want to present repeating groups in relational format, you have to extract the sequence of items in the main XQuery expression.
    Each item is then passed to the COLUMNS clause to be further shredded into columns.
    This should work as expected :
    select x.*
    from abc t
       , xmltable(
           xmlnamespaces(
             default 'urn:swift:xsd:fin.970.2011'
           , 'urn:swift:xsd:mtmsg.2011' as "ns0"
         , '/ns0:FinMessage/ns0:Block4/Document/MT970/F61a/F61'
           passing t.col1
           columns F61ValueDate                Varchar(40) Path 'ValueDate'
                 , DebitCreditMark             Varchar(40) Path 'DebitCreditMark'
                 , Amount                      Varchar(40) Path 'Amount'
                 , TransactionType             Varchar(40) Path 'TransactionType'
                 , IdentificationCode          Varchar(40) Path 'IdentificationCode'                 
                 , ReferenceForTheAccountOwner Varchar(40) Path 'ReferenceForTheAccountOwner'
                 , SupplementaryDetails        Varchar(40) Path 'SupplementaryDetails'       
         ) x ;

  • "Type mismatch" error in IE7/8 when using custom Actions Menu Image

    Hi all,
    in APEX 4.2: when using a custom image in the "Actions Menu Image" attribute in an interactive report, I get a "Type mismatch" error in IE7/8 when refreshing the report through PPR (filtering, sorting, paginating etc.). When I leave the "Actions Menu Image" field empty, everything works fine. The error doesn't seem to happen in IE9 (unless using compatibility mode), or in any non-IE browser.
    I've been able to reproduce the issue in an application on apex.oracle.com:
    http://apex.oracle.com/pls/apex/f?p=69347:1
    Some debugging seems to indicate that the following line in widget.interactiveReport.js is the culprit:
    lTemp.parentNode.replaceChild($x('apexir_WORKSHEET'), lTemp);Does anybody know if this is a known issue, or if there is some workaround?
    Thanks,
    Tobias

    Hi,
    Great solution Paul! It cost me a while before I found out the Action Menu Image was causing my interactive reports to stop refreshing in IE10 and not other browsers. Your solution works great, I've implemented it with a few minor adjustments:
    - Put the css in report template (for some reason it didn't work in our own application stylesheet)
    - replace  'url("/c/action_dropdown.gif")' with 'url("&APP_IMAGE_PREFIX./<path_to_image>")'
    - place one dynamic action on page 0: after refresh of '#apexir_DATA_PANEL' , set event scope to "Dynamic".
    - Let the Dynamic action also fire on page load.
    - To make sure the dynamic action only works for pages with an interactive report add condition of type 'Exists' with expression:
    select 1
    from   dual
    where  :APP_PAGE_ID in (select page_id
                                            from   apex_application_page_ir
                                            where  application_id = :APP_ID
    Best regards,
    Vincent Deelen

  • UDT Type Mismatch Problem

    Hi;
    We have a project which has two modules which uses same UDTs. We have generated UDT's shown in example code. When our project calls B's SP which should return UDT from B.DbObjects namespace, the returned type is A.DbObjects namespace. This occurs because Oracle Data Access gets type name from OracleCustomTypeMappingAttribute and creates instance with that value. Since the namespaces are different, we cannot bind data to our return type. Is there a solution for this?
    Code:
    ///Module A - Output A.dll
    namespace A.DbObjects
    [OracleCustomTypeMapping("SCHEMA.UDTNAME")]
    public partial class UDTNAME : OracleCustomType
    [OracleObjectMappingAttribute("X")]
    public string X { get; set; }
    [OracleObjectMappingAttribute("Y")]
    public decimal Y { get; set; }
    [OracleObjectMappingAttribute("Z")]
    public decimal Z { get; set; }
    ///Module B - Output B.dll
    namespace B.DbObjects
    [OracleCustomTypeMapping("SCHEMA.UDTNAME")]
    public partial class UDTNAME : OracleCustomType
    [OracleObjectMappingAttribute("X")]
    public string X { get; set; }
    [OracleObjectMappingAttribute("Y")]
    public decimal Y { get; set; }
    [OracleObjectMappingAttribute("Z")]
    public decimal Z { get; set; }
    }

    CD Tom wrote:
    > [Microsoft][ODBC Microsoft Access Driver] Data type
    mismatch in criteria
    > expression.
    Hi, Your clue is in the error message.
    This a data type mismatch, it would seem you are trying to
    pass a data
    type to the database that is not consistent with the data
    type set in
    the database design for that column.
    Cheers jojo
    Adobe Community Expert for Dreamweaver 8
    http://www.webade.co.uk
    http://www.ukcsstraining.co.uk/
    Extending Knowledge, Daily.
    http://www.communityMX.com/
    Free 10 day trial
    http://www.communitymx.com/joincmx.cfm

  • Type mismatch on CRVS2010 appl. after install Crystal Reports 2011

    Hi,
    I've a Windows application built in VS2010 with Crystal Reports for VS2010 that exports a report to a PDF, Excel or Word file. The application runs fine, but after the installation of Crystal Reports 2011 I got the "Type mismatch" error when the ReportDocument.Export method is called:
    System.Runtime.InteropServices.COMException (0x80004005): Type mismatch.
    at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
    at CrystalDecisioins.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
    at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
    at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
    at CrystalDecisions.CrystalReports.Engine.ReportDocument.Export(ExportOptions options)
    at MyApp.ReportConfig.Execute() ....
    HELP!!!!
    Uninstalling Crystal Reports 2011 SP1, Crystal Reports 2011, Crystal Reports for Visual Studio 2010 SP1 and Crystal Reports for Visual Studio 2010 (in this order) followed by a re--install of Crystal Reports for Visual Studio 2010 and Crystal Reports for Visual Studio 2010 SP1 does not remove the problem.
    Config:
    Windows 7 Ultimate x64
    Edited by: Adri Koopman on Jul 23, 2011 10:32 AM

    Yes, I asked them to make note also, there have been delays, it was decide to hold off after the info was released and by then it was too late. Once it gets out everyone seems to be able to get it....
    So are you having problems installing still or just exporting? If exporting what code are you using?
    Have you set your Project for 32 or 64 bit, not anycpu?
    What framework are you using, Any of the FULL versions is a must.
    Try this sample:
            private void ExportToStream_Click(object sender, EventArgs e)
                CrystalDecisions.Shared.MicrosoftMailDestinationOptions mailOpts = CrystalDecisions.Shared.ExportOptions.CreateMicrosoftMailDestinationOptions();
                CrystalDecisions.Shared.DiskFileDestinationOptions diskOpts = CrystalDecisions.Shared.ExportOptions.CreateDiskFileDestinationOptions();
                CrystalDecisions.Shared.ExportOptions exportOpts = new CrystalDecisions.Shared.ExportOptions();
                CrystalDecisions.Shared.CharacterSeparatedValuesFormatOptions csvExpOpts = new CrystalDecisions.Shared.CharacterSeparatedValuesFormatOptions();
                CrystalDecisions.Shared.HTMLFormatOptions HTMLExpOpts = new CrystalDecisions.Shared.HTMLFormatOptions();
                rpt.Load(@"c:\reports\b.rpt");
                diskOpts.DiskFileName = @"c:\reports\worldsales.pdf";
                exportOpts.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile;
                exportOpts.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.HTML32;
                exportOpts.ExportDestinationOptions = diskOpts;
                HTMLExpOpts = new HTMLFormatOptions();
                HTMLExpOpts.HTMLEnableSeparatedPages = false;
                HTMLExpOpts.UsePageRange = false;
                HTMLExpOpts.HTMLHasPageNavigator = false;
                System.IO.Stream oStream;
                byte[] byteArray = null;
                oStream = rpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
                byteArray = new byte[oStream.Length];
                oStream.Read(byteArray, 0, Convert.ToInt32(oStream.Length - 1));
                // this is used to verify the file so I saved it to disk
                System.IO.File.Create(diskOpts.DiskFileName, Convert.ToInt32(oStream.Length - 1)).Close();
                System.IO.File.OpenWrite(diskOpts.DiskFileName).Write(byteArray, 0, Convert.ToInt32(oStream.Length - 1));
                System.IO.File.SetAttributes(diskOpts.DiskFileName, System.IO.FileAttributes.Directory);
                oStream.Close();
                GC.Collect();
                MessageBox.Show("Export to Stream complete", "RAS", MessageBoxButtons.OK, MessageBoxIcon.Information);
    Don

  • SCCM Get Collection Member Fails "Failed to get members of collection. The SMS Provider reported an error"

    Full Error is:  "Failed to get members of collection '{Collection Name from "Initialize Data"}'.". The SMS Provider reported an error. Details: Generic failure
    Orchestrator 2012 R2 7.2.84.0
    Using Integration Pack 7.2 for System Center 2012 Configuration Manager
    I have a Runbook that is setup to use Get Collection Members from SCCM.  The fields are:
    Collection:  {Collection Name from "Initialize Data"}
    Collection Value Type:  Name
    When I use the Runbook Tester (or when I try to run it myself) I get the error:
    "Failed to get members of collection '{Collection Name from "Initialize Data"}'.". The SMS Provider reported an error. Details: Generic failure
    I have tried using the Collection ID and I get the same error.  From the Collection Property in Get Collection Members I can browse and see all the collections in SCCM, so I know the connection is working.
    An example of a collection I am trying to use is this:  SUM - Patch and Reboot Server - 3rd Sat 1AM .  I have tried using it with quotes and single quotes as well and I get the same error.
    The log file for SCCM looks like this when it fails:
    CSspQueryForObject :: Execute...~  $$<SMS Provider><03-25-2014 11:34:52.904+300><thread=528 (0x210)>
    ~*~*~e:\nts_sccm_release\sms\siteserver\sdk_provider\smsprov\sspobjectquery.cpp(1782) : Failed to parse WQL string SELECT * FROM SMS_Collection WHERE Name = "{Collection Name from "Initialize Data"}"~*~*~  $$<SMS Provider><03-25-2014
    11:34:52.904+300><thread=528 (0x210)>
    ~*~*~Failed to parse WQL string SELECT * FROM SMS_Collection WHERE Name = "{Collection Name from "Initialize Data"}" ~*~*~  $$<SMS Provider><03-25-2014 11:34:52.904+300><thread=528 (0x210)>
    Execute WQL  =SELECT * FROM SMS_Collection WHERE Name = "{Collection Name from "Initialize Data"}"~  $$<SMS Provider><03-25-2014 11:34:52.904+300><thread=528 (0x210)>
    Execute SQL =~  $$<SMS Provider><03-25-2014 11:34:52.904+300><thread=528 (0x210)>
    Removing Handle 1792008112 from async call map~  $$<SMS Provider><03-25-2014 11:34:52.904+300><thread=528 (0x210)>
    ExecQueryAsync: COMPLETE SELECT * FROM SMS_Collection WHERE Name = "{Collection Name from "Initialize Data"}"~  $$<SMS Provider><03-25-2014 11:34:52.904+300><thread=528 (0x210)>
    CExtUserContext::LeaveThread : Releasing IWbemContextPtr=1862502880~  $$<SMS Provider><03-25-2014 11:34:52.904+300><thread=528 (0x210)>
    My SCCM Administrator and I are out of ideas about what else to try.  Anyone have some ideas on what might be causing the issue? 
    MCITP | VCP4 | VCP5

    Hi,
    may I ask if you modified the log? Because of ...
    Execute WQL  =SELECT * FROM SMS_Collection WHERE Name = "{Collection Name from "Initialize Data"}"~  $$<SMS Provider><03-25-2014 11:34:52.904+300><thread=528 (0x210)>
    Have you typed or subscribe the Published Data to the Field Collection in the Activity "Get Collection Member"?
    It must be subscribed!: Click with right mouse key-> Subscribe->Published Data
    Regards,
    Stefan
    www.sc-orchestrator.eu ,
    Blog sc-orchestrator.eu

  • Error Number 13 Type Mismatch VBScript runtime error

    I am getting the following error when administering web forms in HFM v 11.1.2.1.600.07
    Error Number:13
    Error Description:Type mismatch
    Error Source:Microsoft VBScript runtime error
    Page On which Error Occurred:/hfm/data/WebFormBuilder.asp
    Google searches led me to suggestions that this might be a problem with errors in my Member Lists, but I have checked and re-checked this.  The Member list loads without errors and does not resolve the issue.
    Fortunately the problem is only present in my DEV environment.  The error specifically occurs when you click the Rows or Columns tab in the web form editor.  All other tabs work fine.
    At the same time all web forms are also returning the following error on submit:
    An unknown error has occurred in the HsvWebFormGeneratorACM object.
    Error Reference Number: {FE2DBEB4-89E2-4177-A585-474BDAF18CB7};User Name: vincent@Native Directory
    Num: 0x80040d40;Type: 1;DTime: 23/03/2015 14:09:20;Svr: HYPAPPDEV;File: CHsvWebFormGeneratorACM.cpp;Line: 1122;Ver: 11.1.2.1.000.3082;
    Num: 0x80040d40;Type: 0;DTime: 23/03/2015 14:09:20;Svr: HYPAPPDEV;File: CHsvWebFormGeneratorACM.cpp;Line: 914;Ver: 11.1.2.1.000.3082;
    Num: 0x80040d40;Type: 0;DTime: 23/03/2015 14:09:16;Svr: HYPFNDDEV;File: CHsvWebFormsACV.cpp;Line: 711;Ver: 11.1.2.1.600.3779;
    My normal support options have been voided because I recently installed Microsoft Web Platform 5.0 on the server not knowing it might affect HFM and I am unable to verify whether this issue arose before or after this installation as I hadn't used the DEV environment in a while.
    Uninstalling MS Web Platform and rolling back the IIS settings has failed to resolve the  problem.
    I have the option to restore the environment, but the SQL box hosts 2 DBs used in our PROD environment so I am trying to avoid this.
    Can anyone suggest anything, be it an HFM-oriented or related to undoing changes caused by the installation of the Web Platform?
    Thanks!

    The root cause of the above error is a faulty Data form/Data Grid design which anyone try to run with particular POV. This issue can come up when you have row with Scalc or with NoSuppress option and you have also selected in the data form design the option to Suppress the row with Nodata/Invalid/Zero. This can be conflicting/ambiguous when user selects a POV for which the data form comes up with Nodata/Zero/Invalid rows and hence throws the above error.

  • 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
    >

  • Runtime type mismatch

    We have a LabVIEW strict typedef that we use in many of our VIs that details the StartDate/Time of our tests.  In TestStand, when I "SpecifyModule" for one of my test steps, and view the VI parameters and their Value, I was having to type in RunState.Root.Locals.StartDate.Text/ShortText/Year/Month, and similarly RunState.Root.Locals.StartTime.Text/Hours/Minutes/Seconds.  This was prone to error (and time consuming) typing this in everytime, so I thought I would go to the LabVIEW .ctl file and for the Year (for example), I changed the type from an integer to a string.  I then set the Year default value to RunState.Root.Locals.StartDate.Year.  My hope was that I could "Specify Module" and see RunState.Root.Locals.StartDate.Year waiting for me.  It does show up, but there are two problems:  (1) Since it's a string in LabVIEW, it arrives in quotes in TestStand "RunState.Root.Locals.StartDate.Year".  This is not too big a deal, as I can remove the quotes.  At least the developers don't have to type that everytime. (2) This problem is the killer, and nullifies all my efforts.
    Since LabVIEW passes back RunState.Root.Locals.StartDate.Year as a string, TestStand makes its type "ASCII String".  At runtime, however, the value returned by TestStand into RunState.Root.Locals.StartDate.Year is a Number(I32).  A type mismatch dialog appears, and basically, everything is over.
    Is there a way to get around this?

    Hi mrbean,
    In your Expression Browser under the Operations/Functions tab you can find the Evaluate() function (listed under Other). The evaluate function evaluates any string you pass it, if you pass in the string version of your property it should return the actual property value. This should help you get past the type mismatch.
    Adam
    National Instruments
    Applications Engineer

  • PLEASE HELP - Type mismatch: 'LBound'

    I cannot consolidate anything in my production application, I am getting this error on my rules.
    File: CHsvScriptEngine.cpp Version: 9.3.1.0.1502 Line: 353 Error: (-2147209278)(0x80042FC2)(Error executing VBScript Microsoft VBScript runtime error, Line 1090:Type mismatch: 'LBound'.)
    Backround:
    I had an entity that had no parent (parent = root).
    I then moved this entity under a parent. Now when I calculate this entity I get the error message above.
    Any ideas?
    I have the exact same rules/memeber lists/metadata in my test application and it works fine but not in production??
    Rules:
    '==========================================================
    'Calculate current month to prior MONTH non-FX differece
    '==========================================================
    'Create a list of base balance heet accounts
    sAcctList = HS.Account.List("","Master1")
    'Loop through each account in the list
    For sAcctLoop = LBound(sAcctList) To UBound(sAcctList) LINE 1090
    'Set the accounts to process
    sAcct = sAcctList(sAcctLoop)
    'HS.Clear "A#" & sAcct & ".C2#Other.C4#[None]"
    HS.EXP "A#" & sAcct & ".C2#Other.I#[ICP None].C4#[None] =" & _
    "A#" & sAcct & ".C1#TOTC1.C2#Diff_CM_PM.I#[ICP Top].C4#[None] - " & _
    "A#" & sAcct & ".C1#TOTC1.C2#CTA_Chg_Mom.I#[ICP Top].C4#[None]"
    Next

    It turns out that I had loaded an incorrect member list file and it was missing the account member list that this section of code in the rules was looking for.
    An error message of "missing member list" would have been helpful. :(
    It was only through trial and error that I figured it out.

Maybe you are looking for

  • Java class not found

    I am very new to java,when i wrote my first java program ,the code follows class Example2 { public static void main(String args[]) { int num; num=100; System.out.println("This is num:"+num); num=num*2; System.out.print("the value of num*2 is "); Syst

  • N8: Vodafone UK 360 Update Unremovable App - Remov...

    I'm writing this mainly for the UK vodafone forum. but it might be useful to one or two people here. Background: Those of you who routinely delete the operator tat installed on your phone will have noticed that the app Vodafone 360 Update can not be

  • First attempt at windows pc connecting to airport express

    All pf my macs can connect to my airport express and use the internet. I am trying to connect an IBM thinkpad with windows XP to connect. The laptop cannot see the AX at all ( it does have an infared port) Help!

  • Hideshow region column sort problem

    Hi, I have a HideShow region containing a PPR report. All is well except that the region hides when I click a column header to sort. Anyone got a solution to this? I've tried a few methods involving trying to store the ID of the region in a user-pref

  • Adding iview to role/folder  using wd

    I am working on requirement  to add  iview to Role/Folder using webDynpro.I have developed following code based on forums. Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY); env.put(Con