Date Error with DB

String rday=req.getParameter("rday");
     String rmonth=req.getParameter("rmonth");
     String ryear=req.getParameter("ryear");
     String pdate=rday+"-"+rmonth.substring(0,3)+"-"+0+ryear;
     int rday1=Integer.parseInt(req.getParameter("rday1"));
     String rmonth1=req.getParameter("rmonth1");
     String ryear1=req.getParameter("ryear1");
     int rday2=(rday1+1);
     String pdate1=rday2+"-"+rmonth1.substring(0,3)+"-"+0+ryear1;
     rs=stm.executeQuery("select news_product.news_id,news_product.product,news.news_id,to_char(news_date,'dd-Mon-yy'),news.heading from news_product,news where news.news_id=news_product.news_id and news_product.product='Steel and Metal' and news_date between '"+pdate+"' and '"+pdate1+"' order by news_date desc");ERROR:
java.sql.SQLException: [Microsoft][ODBC driver for Oracle][Oracle]ORA-01858: a non-numeric character was found where a numeric was expected
and when am parsing int then it also gives error so
please let me know the solution
TIA

prepared statement is not all that you are insisting for it.Yes it is.
>
I solved my problem and am quoting here for other
peoples:
String startDate=rday+"-"+rmonth+"-"+ryear;
String endDate=rday1+"-"+rmonth1+"-"+ryear;This will only work for your particular situation. Not a general solution for "other peoples".
anyhow I appreciate your help and thanks to you that
you have given me your precious time. thanks again
Sabre150It might "work", but it's far from optimal.
%

Similar Messages

  • HT5439 Has anyone had the Network time and date error with Apple TV when traveling?

    Has anyone had the Network time and date error with Apple TV when traveling?

    Jasion,
    Maybe a bit beside the question, but it is always recommended here to open/save from/to own hard disk, and to copy from/to networks and removable media. You may be lucky, at least for a while, but it is better to be safe than sorry.
    In addition to the (far greater) risk of file corruption, some issues are mentioned here:
    http://helpx.adobe.com/illustrator/kb/illustrator-support-networks-removable-media.html

  • Several Issue: Stale Data Error with 2 pages opened at same time

    Hello Gurus,
    I developed an OAF page to create and also update records. My page, depending from the operation, can show the data on fields, for update, or blank, on case to create records. This page contains one LOV field, input fields and textarea field to get the data.
    When i try record or update using one page per time, the LOV field works fine and records are uptodated with success.
    But if i use 2 pages or more in these situations:
    - one page is opened in update operation;
    - another page to create a new record.
    Issue: When i click to change the LOV field value on create page, or update page, the Lov pop-up is opened with success, but when i click in another value, i get this error below. Any action also can cause this error, like click on Back Button (with name 'Voltar', created by me). Please see the error below:
    Error: Stale Data*
    The requested page contains stale data.*
    This error could have been caused through the use of the browser's navigation*
    buttons (the browser Back button, for example).*
    Cause:*
    The view object XXXAM.XXXVO1 contained no record.*
    The displayed records may have been deleted, or the current record for the view*
    object may not have been properly initialized.*
    This error hapens when i open 2 pages on update operation mode also.
    This error dont hapens only when i open 2 pages on create operation mode.
    Ps:
    Note: I have an ApplicationModule (AM) for LOV and another AM for this page, but i used this other AM to another page too and VOs. Have any problem on this???
    To help to understand, i printed my page, u can see the screenshots on links below:
    http://imageshack.us/a/img850/9186/printforum1.png
    http://imageshack.us/a/img197/2185/printforum2.png
    I´ll print some code blocks and if u need know more code blocks, please tell me:
    My PageCO Controller, at processFormRequest, code to define update or create Operation:
    +if (row.getNewRowState() == Row.STATUS_NEW) {+
    operationType = createOperation;
    +} else {+
    operationType = updateOperation;
    +}+
    My Controller, at processRequest, update or create operation:
    +if (!pageContext.isFormSubmission()) {+
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    String reqHeaderId =
    pageContext.getParameter("requisitionHeaderId");
    +Serializable[] params = {reqHeaderId};+
    IcxReceivingAlreadyExistsVOImpl receivingExistsVO = (IcxReceivingAlreadyExistsVOImpl)am.findViewObject("IcxReceivingAlreadyExistsVO1");
    receivingExistsVO.initQuery(reqHeaderId);
    +if (receivingExistsVO.hasNext()) {+
    TransactionUnitHelper.startTransactionUnit(pageContext, UPDATE_RECEIVER_TRX);
    am.invokeMethod("initPersonQuery", params);
    +} else {+
    TransactionUnitHelper.startTransactionUnit(pageContext, CREATE_RECEIVER_TRX);
    am.invokeMethod("createReceivingPerson", params);
    +}+
    +}+
    My AMImpl.java :
    +public void createReceivingPerson(String reqHeaderId) {+
    OAViewObject vo = getIcxReceivingPersonVO1();
    +if (!vo.isPreparedForExecution()) {+
    vo.executeQuery();
    +}+
    Row row = vo.createRow();
    vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    row.setAttribute("RequisitionHeaderId", reqHeaderId);
    +}+
    +public void initPersonQuery(String reqHeaderId) {+
    IcxReceivingPersonVOImpl vo = getIcxReceivingPersonVO1();
    +if (vo == null) {+
    +MessageToken[] errTokens = { new MessageToken("OBJECT_NAME", "IcxReceivingPersonVO1")};+
    throw new OAException("AK", "FWK_TBX_OBJECT_NOT_FOUND", errTokens);
    +}+
    vo.initQuery(reqHeaderId);
    +}+
    +public void apply() {+
    getTransaction().commit();
    +}+
    +public void rollback(){+
    Transaction txn = getTransaction();
    +if (txn.isDirty()) {+
    txn.rollback();
    +}+
    +}+
    In the hope of a solution, waiting for ur precious help, Gurus
    My true thanks since now,
    Best Regards,
    Alberto Bogéa

    Hi,
    Can you please tell, if you are using the same EO/VO combination for both the operation - Insert and Update on both screens.
    Quite possible, that when you open two screen in say Update Mode and you open the two List Of Values, then as soon as you have selected the value in one of the LOV, the Other LOV will throw you stale data as the same VO/EO is being used.
    Try using two different EOs/VOs combination and see if that helps.
    Regards,
    Saurabh Agrawal

  • Date Error with Albums

    i recently been noticing problems with some ordering of my albums
    in my itunes window i display my albums by "albums by year" but some albums are placed later when they have an earlier album date
    i've tried changing the tags, changing the date etc but nothing moves it to its correct position
    I've checked to see if all the info is right and it is
    can anyone help with this problem?
    thank you in advance

    yeah i dont like how itunes organises my files
    so i have folders for each artist, then playlists for each album!
    i've thought of the rogue characters, so i've checked all the little idyiosyncracies that could be wrong with it
    i managed to fix one of my artists by labelling the 'album artist' as the artist and that put them in the right order
    but for another artist nothing i did put it in the correct order so i've been forced to add the 'year' in the playlist and organise it through that
    i'm very anal when it comes to my organisation and i'd prefer it if things just worked lol
    thanx for all your help, i guess now it just remains a mystery!

  • Data error with generic extractor

    Hi Friends!
    I have a generic extractor based on view z_customer
    The view is easy:
    table: KNVP
    fields: KUNNR, KUNN2, PARVW, MANDT
    conditions: PARVW eq 'RG'
    When I check the table (SE16)  with customer 'X', show me only one record,
    but when I run the extractor (RSA3) show me four records.
    - What is wrong in my view?  Perhaps something relative with the client (MANDT)?
    Thank you in advance!

    Hi.,
    It's not mandatory that you must include MANDT field in view.
    check check the number of records in the created view, not in the table.
    If the number of records matches in view with RSA3, then it is fine.
    -- Selva

  • I am trying to download the new episode of Game of Thrones on my iPad. We are currently travelling in Italy and have an unlimited pre- paid data plan with the Italian carrier Wind.  When I try download the episode through iTunes I get an error message

    Hi there, traveling through Italy with my iPad. Purchased a unlimited prepaid data plan with Italian carrier WIND.  Has been working excellent, but when I try to download a new episode of Game of Thrones, I get an error message which says that I have to connect to a wi fi network or download the episode on my MacBook.  Why can't I download using the microsim and prepaid data plan?  Any help will be great thank you!

    Unfortunately downloads larger than 20mbps require wifi due to most carriers having data limits. This "requirement" keeps people who are not familiar with data and what takes up a lot of data from going over.

  • Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of '

    When I deploy the cube which is sitting on my PC (local) the following 4 errors come up:
    Error 1 The datasource , 'AdventureWorksDW', contains an ImpersonationMode that that is not supported for processing operations.  0 0 
    Error 2 Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of 'Adventure Works DW', Name of 'AdventureWorksDW'.  0 0 
    Error 3 Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Customer', Name of 'Customer' was being processed.  0 0 
    Error 4 Errors in the OLAP storage engine: An error occurred while the 'Customer Alternate Key' attribute of the 'Customer' dimension from the 'Analysis Services Tutorial' database was being processed.  0 0 

    Sorry hit the wrong button there. That is not entire solution and setting it to default would work when using a single box and not in a distributed application solution. If you are creating the analysis database manually or using the wizard then you can
    set the impersonation to your heart content as long as the right permission has been set on the analysis server.
    In my case I was using MS Project Server 2010 to create the database in the OLAP configuration section. The situation is that the underlying build script has been configured to use the default setting which is the SQL Service account and this account does
    not have permission in Project Server I believe.
    Changing the account to match the Project service account allowed for a successful build \ creation of the database. My verdict is that this is a bug in Project Server because it needs to include the option to choose impersonation when creating the Database
    this way it will not use the default which led to my error in the first place. I do not think there is a one fix for all in relations to this problem it is an environment by environment issue and should be resolved as such. But the idea around fixing it is
    if you are using the SQL Analysis server service account as the account creating the database and cubes then default or service account is fine. If you are using a custom account then set that custom account in the impersonation details after you have granted
    it SQL analysis administrator role. You can remove that role after the DB is created and harden it by creating a role with administrative permissions.
    Hope this helps.

  • An error occurred querying a data source - with REST services

    Hi,
    I have a SharePoint 2013 form library library with an info-path form. I need to get the logged in user's 'Display Name' on my form load automatically.
    I used REST service to fetch the current user details. In the preview mode of the form, its showing the right name. But when I publish this form to library I am getting the following error.
    REST Service --> http://site url/_api/SP.UserProfiles.PeopleManager/GetMyProperties
    Please help me to resolve this issue.
    Thanks in advance for your time and reply :)

    Hi,
    According to your post, my understanding is that an error occurred querying a data source with REST services.
    It is defiantly permission issue with GetUserProfileByName service
    and could be many reasons of this problem. You first try with UDCX file and make sure that UPS is running.
    Here are some similar threads for your reference:
    http://social.technet.microsoft.com/Forums/en-US/b8c668ea-7511-4657-a1a8-08fb4a6bd53d/info-path-an-error-occurred-querying-a-data-source?forum=sharepointcustomizationprevious
    http://social.technet.microsoft.com/Forums/en-US/46866ac2-da09-4340-a86a-af72cbb2c8d7/info-path-an-error-occurred-querying-a-data-source-?forum=sharepointcustomization
    http://blogs.msdn.com/b/russmax/archive/2012/08/17/want-to-call-sharepoint-2010-web-services-within-browser-based-infopath-2010-forms.aspx
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Shared Data Source with prompted credentials - errors out.

    Using Data Tools (VS 2010) to build report.
    Have built a simple report while trying to diagnose this issue.  This report is created in a project that was originally built in BIDS2008 and migrated to Data Tools 2010.  This project contains an original shared dataset that does NOT
    error out.
    Report contains
         1) shared data source with properties set to prompted credentials.
         2) shared dataset using data source above
         3) 2 parameters (month and year)
         4) Report uses shared dataset
         5) 2 text boxes in the report body to display the parameters values.
    When I try to preview this report I get the error:
         The execution failed for the shared data set "xxx"
         Cannot create a connection to data source 'Data source for shared dataset'
         Security processing failed with reason "3" ("password missing")
    Now, if I changed that same shared dataset to use a static login and password; the report renders fine.
    What is going on???

    Hi RoseNeedsAVacation,
    When you use shared data source with "Prompt for credential" option, please use SQL Server login credential to u view the report in BIDS or SSDT report designer environment.
    Note: The shared data source will automatic switch to SQL Server authentication mode if we use "Prompt for credential" option.
    After you deploy your report and shared data source to report server, please remember to configure your shared data source to use "Credentials supplied by the user running the report" option. Furthermore, select "Use
    as Windows credentials when connecting to the data source" checkbox if the credentials that the user provides are Windows Authentication credentials. Do not select this check box if you are using database authentication (for example, SQL
    Server Authentication).
    For more information, please refer to the article below:
    New Data Source Page (Report Manager):
    http://technet.microsoft.com/en-us/library/ms180077(v=sql.100).aspx
    Regards,
    Elvis Long
    TechNet Community Support

  • "Source not found" Error creating URL Data control with query parameters

    Hi,
    I have a restful service for which i want to create a URL data control. I am able to create the URL data control successfully when i am not passing any parameters in the Source field. But if i am specifying the parameters in the source field like this Department=##ParamName##, something weird is happening. After giving the param string in the Source field, it asks for default param value to test the url. It tests the url successfully. After that i select XML as the data format in which i am mentioning the xsd like this . "file:///C:/..../something.xsd" . And this is when i am getting the error. "Invalid Connection. The source is not found". I am giving exactly same path for xsd which i gave while creating URL data control without query parameters. Infact i was able to create the URL data control with query parameters successfully till afternoon. after that it started giving me this error all of a sudden. Infact as soon as i was able to create a URL data contol with query parameter successfully, i took a backup of the application before moving further. But even that backup is not working now.
    As far as i understand, i dont think there will be any change in xsd if query params are passed to a web service. Please correct me if i am wrong.
    Just dont know what could be the issue. Please help
    Thanks

    Hi,
    xsd is used for the URL service to know what the returned data structure is so it can create the ADF DC metadata
    Frank

  • Error with Date Variable

    I am trying to create a process to import to import data using a date variable but when I use the date to get the data from SQL server I am getting a error.
    I have tried setting the variable as both a string and date - Select
    CONVERT(varchar(10), DATEADD(day, -1, GETDATE()), 101) and map it to the Variable. The date variable is working. It’s correct in the Watch and I am able to use the variable to get data from an Open Link database (row_date = ?)
    in the OLE DB Source query. I get a "Invalid character value for cast specification"
    error when doing the same thing to get data from an SQL Server OLE DB Source
    where the date field is DateTime (row_date = ?). I have tried making the variable as a date and string but get the same error regardless. To make it work, I have to duplicate the date
    calculation in the query - HAVING (row_date = CONVERT(varchar(10), DATEADD(day, -1, GETDATE()), 101) ) which works fine.
    HAVING (row_date = ?) gives the error with the Parameter mapped to the variable.
    Any suggestions as to how to make this work correctly?

    May I suggest to use style 111 instead of 101?
    From experience, yyyy/mm/dd date format will work most of the time for date conversion and
    It's due to different date format from mm/dd/yyyy to the system date format that SQL Server is using.
    Hope this helps.
    ~ J.

  • Data record with time interval error

    Hi,
    I have come across the following error.
    Data record with Time interval error and data is getting loaded into data target and no PSA in between.
    thanks
    kris

    Hi Kris,
    Could you please explain your problem little bit more. I mean what is source and target, or you using IP or DTP.
    goto the details in monitor tab, you will come to know to which record yo uhave error.
    If you are running IP, it is recommended to keep PSA.
    Regards,
    Venkatesh

  • Display Driver Error (with up to date drivers)

    Hello!
    I've got a Lenovo Thinkpad R500 running Windows Vista.
    I seem to be having an issue with my display driver. Everytime I open Adobe Photoshop, I get an error that photoshop has encountered an error with my display driver, and it does not display images properly (they seem to be very low resolution).
    I checked my drivers, and everything is up to date. I even ran Windows Update just to be sure.
    Can anyone provide any feedback on this?

    Hi Chris,
    Thank you for your reply. I've done the Windows update and also gone into my device manager to check for updates. Everything says it is up to date.
    If I set the Photoshop GPU mode to basic, will things still appear correctly? Also... how do I do that?
    Steve - I've got enough VRAM. As far as the driver, it's the Mobile Intel (R ) 4 Chipset series. Is there another way to update this driver?
    I guess I'm wondering why my driver seems up to date in all aspects, but Photoshop (CS 6) is telling me there is an issue with the driver.

  • Critical error with data load

    Hello Gurus,
    I was trying to load data ffrom ODS to a Cube using DTP when I got the following error:
    Exceptions in Substep: End Routine - RSBK231
    The database returned a value containing an error
    Do you know what this error message means. It refers to a end routine and I had no syntaxt errors with the endroutine. It also worked fine with previous data loads.
    Any help in this regards is appreciated.
    Thanks
    Rishi

    Hi Rishi,
    There might be some syntactical error in your end routine e.g division by a zero. This is just an example. Try running the DTP in Debug mode (you will get the option under execute tab of DTP) and see what the end routine code is doing. There might be some exception which you need to take care of.
    Thanks..
    Shambhu

  • QUERY ERROR WITH WILD CARD ON FORM WHEN NO DATA WWC-49102

    Portal 30985 ; database 9014 on sun solaris
    Same server : two databases 9014 : db1 with portal and db2(used here as remote database);
    Step1 ; Create public database link; db_link on db1 through Portal interface;
    Step2 ; create public synonym emp_syn for table emp@db_link through Portal interface;
    Step3 :create form based on emp_syn;
    the form is generated OK and also is behaving OK when Insert,Update,Delete from
    underlying table ;but when I am quering for 758% into the empno field I've got the same error:
    Error: An unexpected error occurred: ORA-00000: normal, successful completion (WWV-16016)
    No conversion performed for type NUMBER, value 758%. (WWC-49102) INSTEAD OF RETURNING EMPTY FORM(NO ROWS)
    I have tryed to query on other fields ;
    querying on a numeric field will give the above message;
    querying on a varchar or date field with or without wild card will raise the following error:Error: An unexpected error occurred: ORA-00000: normal, successful completion (WWV-16016)
    An unexpected error occurred: ORA-00000: normal,successful completion (WWV-16016).
    Lawrence

    Hi Mike,
    You can actually just check for the existence of the cell:
    var l_Cell = $x(pId);
    if (l_Cell)
    rest of the code to hide the column
    }As long as l_Cell refers to a valid page item, then the if test passes and the rest of your code can run.
    Andy

Maybe you are looking for

  • CRM 7.0: set up IPC product configuration

    Dear experts, we set up a CRM 7.0 with ERP 6.0 backend integration. In the ERP we apply ERP variant configuration (Materials). Quite simple: some configurable materials (material type KMAT) with a few characteristics and product variants of them (mat

  • Curve 8530 no longer works

    My Curve 8530 decided to overheat and kill the hardware on my phone. I can replace the battery, but it immediately dies. I walk into US Cellular to their service center to see whats up, I am told this is an issue that has created headaches for many p

  • Problem with Windows Media Player -- saving, transferring

    Operating system:   Windows 7 Home Premium        Product: HP Pavilion P6000 Series Windows Media Player Copy short videos onto a thumbnail drive from a different computer running Windows 7 with Windows Media Player.    Thumbnail drive accepts files,

  • Laptop problem leads to ipod problem please help

    hello to all the read this, after a virus on my laptop i had to restore it back to factory setting's now the only copy of my iTunes libury is on my ipod nano 8GB. I purchased the laptop and the ipod at the same time back in 2006 thus can prove its no

  • Having troubles passing values of Shuttle control to SQL Query of Report and Chart Region

    Hello, I am very new to APEX and need help for one of the Pa.I have a shuttle control on my page which populates Categories. Once user selects Categories from this control, I wish to pass the values to following SQL query : select * from emp_class wh