Urgent preparestatement issue

Hi
i am trying to update the single record based on my requirement. here my requirement is i have 2 fields in page like userid,username and 3 fields in database userid,username and end_date of xx_user table . when i enter the data and click the apply button save this records into database along with i want to update end_date record in database. for that i used prepare statement to update the record. here records are saving success fully, but end_date record is not updated according to my requirement. i used below code.
if(pageContext.getParameter("Apply")!=null)
String username=pageContext.getParameter("username");
String s="update xx_user set END_DATE=trunc(SYSDATE+13) where user_name='"+username+"'";
try
PreparedStatement ps=am.getOADBTransaction().getJdbcConnection().prepareStatement(s);
int update=ps.executeUpdate(s);
if(update>0)
System.out.println("update Sucessfull");
else
System.out.println("update UnSucessfull");
catch(Exception e)
System.out.println(e);
am.getOADBTransaction().commit();
here i am not facing any errors. let me know is any thing wrong in mycode and any any thing i have to add in my code. please can any any one solve the issue.
Thanks in advance.

Please note the code snippet below:
String username=pageContext.getParameter("username");
//Have a bind parameter in your string
String s="update xx_user set END_DATE=trunc(SYSDATE+13) where user_name=:1";
try
PreparedStatement ps=am.getOADBTransaction().getJdbcConnection().prepareStatement(s);
//Bind the bind parameter and execute the prepared statement.
ps.setString(1,username);
int update=ps.executeUpdate(s);
if(update>0)
System.out.println("update Sucessfull");
else
System.out.println("update UnSucessfull");
}

Similar Messages

  • A very urgent deployment issue about DBAdapter

    Hello All,
    I have a very urgent deployment issue about DBAdapter.
    That DBAdapter is connect to DB2 AS400 Database. I have a developing database (jdbc:as400://server01/TEST) and a production database (jdbc:as400://server01/PROD).
    During developing, I used DBAdapter wizard to create it, and import some tables, and set the Adapter to use jabc/DB2DS as connection information for easily deployment later.
    Then I deploy to Production. I configured Data-source.xml and oc4j-ra.xml rightly; I set DB connection point to production database. But the DBAdapter still write into developing Database.
    I checked the DBAdapter, the imported tables are something like this, TEST.table1, TEST.table2. And there are a lot "TEST" located in DB2Writer_toplink_mapping.xml, DB2Writer.xml, TEST.schema, DB2Writer.table1.ClassDescriptor.xml.
    This TEST is refrer to the TEST in connect String jdbc:as400://server01/TEST.
    I think this might be the reason cause the problem. As to production database, "TEST" should replaced by "PROD". If I changed it manually, I have to change every time when switch between TEST and PROD. And I also don't know if it is safe to do it? (I tried, and bring some toplink mapping problem)
    By the way, for Oracle Database, because we use 2 instances for testing and production with same schema name, and do not have this issue.
    Anyone could help and many thanks.
    Kerr
    Message was edited by:
    Kerr

    Hi Kerr,
    The idea is to set up all connections in the BPEL or ESB services with logical names, e.g. typically of the form eis/DB/MyFinancialSystem or eis/DB/MyLogisticsSystem. This way, you do not have to modify code when deploying it onto different environments that serve different purposes.
    When moving your services through their lifecyle, on every environment you deploy these to you will have the same logical connections configured on each instance, e.g. for DEV, QA, SIT, UAT and PROD. Only, in case of QA the actual physical connection is configured to point to the QA instance of the systems that your services interact with whereas in case of UAT it points to the UAT instance of the same system.
    Maybe your problem is caused by connecting as user "SomeUser" when running the DB Adapter wizard during development and actually selecting objects from a different schema than you used to connect with, e.g. "Test" in your case.
    Hth,
    Sjoerd

  • (Urgent) Sysdate issue in Oracle applications scheduler.

    Hi All
    I have used the query 'SELECT SYSDATE FROM DUAL' for a parameter in concurrent request. If I execute this concurrent as a single request, then it returns exact sysdate (current date) in a parameter.
    If i schedule this program for daily execution using scheduler, then the sysdate is always giving value of the date when i have configured the scheduler.
    For example,
    My Requirement :The scheduler configured such a way that it should run everyday.Whenever it runs my query has to return the current date.
    Current Issue: I schedule the scheduler on 23-Dec-2008. If it runs on 24-DEC-2008,it returns as '23-DEC-2008', If it runs on 28-DEC-2008 also,it returns as '23-DEC-2008.However If I execute this as a single request, it works fine.
    Can anyone help me please,,It is very urgent.
    Thanks in Advance

    Hi,
    I can confirm that this does work properly on 11.1.0.6 . Here is the code I used
    -- create a table for output
    create table job_output (log_date timestamp with time zone,
            output varchar2(4000));
    begin
      dbms_scheduler.create_job (
        job_name => 'myjob',job_type => 'plsql_block',
        job_action =>
      'insert into job_output values(systimestamp, ''myjob runs'');',
        repeat_interval=>'freq=minutely',
        number_of_arguments => 0, enabled => true);
    end;
    exec dbms_lock.sleep(130);
    select * from job_output order by log_date ;The table job_output clearly shows dates increasing by one minute every run. If you use "freq=daily" instead then the job will run once a day instead of once a minute.
    Does this example work for you ? If not could you post output from the job_output table and tell us what version database you are using.
    Thanks,
    Ravi.

  • Very urgent Decimal issue in ADF page

    Hello friends,
    i have an issue in ADF page which was weight field, issue has below.
    1) weight filed was validated that without entering 5 digit value in filed, example suppose i enter 12345 in weight it is showing that in small dialog box -weight value should be 0 to 9999.999 only. but it is let me to go next field and submit button. it is happening only in create page only.
    2)but when i go to detail page , same weight fild is populated there - i enter invalid weight something 12345, it is showing that in small dialog box -weight value should be 0 to 9999.999 only. but here let me not go to another filed until i ENTER valid value.
    create page weight filed need to work same as detail page.i am new to ADF development, how to check where this validation done and how to fix this.
    very very urgent.
    Thanks,
    vamshi.

    If you use ADF BC, open the entity and choose "Business Rules". You can then add validation rules such as range limits under the attributes. It is usually best practice to include validation rules in the entity (model layer), this way they apply automatically to all view objects based on the entity and you are guaranteed to have only valid values in the database. (View layer validation may have its place as a convenience supplement.)
    Read more about business rules in the developer's guide: http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcvalidation.htm

  • Urgent : Export issue

    Hi,
    I had an export script to export my database full. It was running well every day until this morning I met this issue. If someone can help me, it's very urgent !
    Thanks
    bash-3.00$ ${ORACLE_HOME}/bin/expdp system/xxxxxxx full=y directory=EXPORT_DUMP_M3PROD dumpfile=${DUMPFILE} logfile=${LOGFILE}
    Export: Release 10.2.0.4.0 - 64bit Production on Monday, 18 May, 2009 11:06:13
    Copyright (c) 2003, 2007, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, Data Mining and Real Application Testing options
    ORA-31626: job does not exist
    ORA-31650: timeout waiting for master process response

    So, I opend a SR in Metalink.
    They ask me to rerun catproc.sql and give me a note to delete orphaned jobs
    Frist of all the CATPROC component should not be INVALID in the database
    For this you have to rerun the catproc.sql script which can be found in $ORACLE_HOME/rdbms/admin
    ACTION PLAN
    ============
    1. startup restrict
    2. spool catproc.log
    3. @?/rdbms/admin/catproc.sql
    4. spool off
    Second please use Note.336014.1 Gen Ext/Pub How To Cleanup Orphaned DataPump Jobs In DB
    A_DATAPUMP_JOBS to cleanup the data pump jobs and then retry to export
    Thank you !!
    oldschool

  • URGENT Battery Issue...

    Hello, I'm in desprite need of help... I have a HP G62-34OUS Notebook, I've had it since around Febrary of last year. I also have a warrenty with Staples where I bought it.
    My issue is that the battery won't latch. And I haven't taken it apart or anything! I've taken very good care of it, and the batterie's only defect would be a small corner being bent. The bent corner is barely noticable and has worked for the last six months that it's been that way.
    What should I do about this? I'd like help urgently... This is being typed while it is on a power supply in my wall, my area has gotten a lot of storms lately, so please try and hurry... Thank you in advance for those who reply!
    ~Justin Greenough

    I would suggest using the warranty at Staples. If you open it on your own, chances are it might be havinf some issues, worst case, void your warranty. 
    I say bring it to staples with your warranty card. 

  • Urgent qty issue more

    hi expert
    my issue is as.vendor sent goods 3900, in GR they have done for4000 in plant(a)
    this plant deliver the goods to plant(b)4000 and billing qty is also 4000.my issue is i wants to take back qty100 back and .how to reverse is qty plz suggest
    urgent
    points will be awarded

    hi expert i wants to add on thing plant(b)actually receipt3900
    qty.how to match difference

  • !!!Very Urgent-Production Issue -Please help

    Hello IDMers,
    We are facing an issue in production, we updated the AD Process form yesterday. Two fields- Employee Type and Employee ID field in AD User Process form got refreshed for all existing users. Those two fields are empty now for all users.
    But these fields have appropriate value in the Xellerate User Table for all users. Now I need to some how populate the Employee Type and Employee ID field for all employees from User Table to AD Process form.
    for example: Consider an Employee called Peter- His emp type is Full Time and Emp ID is 100; which i have it in OIM User Table, but this user is provisioned with AD and now i will have to update his AD Process form so that these two fields are populated. I need to do this for all users in OIM. I guess the prepop adapter triggers only when the form is created for the first time. Please suggest me some ideas.
    Is there a easy way to do this task?
    What my thinking is, I need to have a scheduled task that basically loops through all users and updates their employee type and id field in AD User Form from Xellerate User Table.
    Please help me with this as it is highly important.
    Thanks again every one for your support all the while.
    Regards,
    ~VSN

    hey,
    i was doing lots of migration from one OIM box to another during our last release. I guess something would have gone wrong while doing an import/export from one OIM system to another.
    What I learned was while doing an import the vulnerable object is AD USER (or any resource of OIM) Object (both Process form and process definition), because those are the two objects which you need to import fully no matter how big a change you have done.
    So when you do an import watch out for USER DEFINED FIELDS in the process form because for me the two fields which disappeared were user defined/custom created by me. So make sure you export the latest version;even if you didnt make any changes to them better create a new version copy of the form and then export it.
    Hope that helps.
    ~VSN

  • Urgent: UDC Issue

    Hi All,
    My requirement is to extract the data from the legacy system i.e. Sybase 12.5 using UDC to SAP BI 7.0. We have established UDC connection, created view and BI 7.0 datasource. The user has all the access i.e. select, dbo access for the view. While datasource creation I have selected UDC source object from the Sybase, used default system proposed fields and activated the datasource. When I try to check the data in the preview, I am getting following message in the status bar:
    S:RSSDK:300 Query execution failed: "DB name"."dbo"."VIEW1" not found. Specify owner.objectname or use sp help to check whether the object exists (sphelp may produce lots of output). I have checked in the URL http://<hostname>:port/TestJDBC_Web/TestJDBCPage.jsp before preview, it worked fine and showed all the table names and data in tables.
    J2EE Visual Admin Logfile Data:
    Error: com.sap.ip.bi.sdk.datasource.beans.BI_SDK_Bean$MsgException: Query execution failed: "DBSctlg"."dbo"."view_tbl_xref_1" not found.
    Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output).
    Error#1#/Applications/BI/UDI#Java###com.sybase.jdbc3.jdbc.SybSQLException: "DBSctlg"."dbo"."colores" not found.
    Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output)
    By same username I have logged in Sybase and ran created view, which extracted data without any problems.
    We have followed same procedure for creation of connections, views and datasources for SQL server, it is working fine without any issues. We have problem only with Sybase system. Would anyone help me in resolving this issue. ******Gurantee of award points********
    Regards
    Eric.

    I don't use the new CF tags, but I've been using Extjs 1.1
    for a recent project. While there may be some internal limit
    imposed by CF, I think that 20 is way too many grids for a page and
    I think the web page will choke trying to display everything. I'm
    finding that the extjs grid really bogs down the browser when
    handling large grids and seems to consume large amounts of
    resources in general.

  • Urgent CSS issue in Safari! LIVE site *****

    A site I recently wrapped up was working great in all
    browsers, and for some reason I hopped on Safari today and noticed
    it's not formatting right at all! I'm not sure where the issue is
    as it was hunkey dorey before, and am hoping somebody on here might
    know so I can fix it quickly before there are complaints from
    people browsing to the site.
    http://www.mackinnonicehorse.com
    Anybody have any ideas? If you look at it in other browsers
    you'll see how the navigation should be, and there are some other
    small CSS issues in Safari that I'm seeing. It was working fine
    though… ideas? Please help!

    Never mind… there was ONE little mistake in my
    stylesheet that I fixed and BAM - everything back to normal.
    PHEW!!! :)

  • Urgent.. issue in MM loading: 2lis_02_scl and 2lis_02_itm

    Hi Gurus,
    I am getting a short dump when i am trying to load the data from datasources: 2lis_02_scl and 2lis_02_itm.
    It is giving the error message  : "
       "MESSAGE_TYPE_X" C
       "SAPLRSC2" or "LRSC2U01"
       "RSC2_QOUT_READ_DATA"
    and even the repeat of delta has failed again.
    Can ne body please help as this is business critical issue.
    Thanks in advance,
    Anurag Rathore

    Hi
    There is one other method where in youc an go to the Item and Schedule line tables ( EKET) and filter on created on and load those documents into BW.
    However this is tedious process as you many have several documents to fill the setup tables
    This is just another alternative..
    Regards,
    Srini

  • URGENT Skype issue with hacking accounts

    Hello,
    I'm Dan, and just about an hour ago, I managed to recover my account after a 30 minute live chat. I run an online business and a lot of my work involves Skype. In other words, Skype is key to my business. All of my partners work through Skype, so without Skype, I'd be in a bit of trouble.
    At 7am this morning, I checked my emails and found I had an email sent to my primary Skype email address stating that my "Registered email successfully changed". Immediately I knew what had happened.
    I contacted Skype support (after having to buy a premium account for £6), they were very helpful but I was not happy about paying £6 due to an issue on Skype's behalf. After my live chat was closed I was told to be sure that I don't get phished or install any kind of virus which may discover my Skype password, I knew that these would not be benefitial due to the circumstance.
    So how does it work?
    Before I begin explaining, I am referring to the person who changed the email as a "hacker".
    So, firstly, the hacker contacts Skype support, I don't know whether it was live or not but they had to contact support. The hacker claims they are me, stating that they forgot their password and you can't access your email either, so your primary email would have to be changed. Ofcourse, there is some verification. The person at the other end of the support chat will ask for some recent activity on your account.
    In my case, the hacker had used multiple VPN's to add me, had added me on several accounts, this was completely oblivious to me, that they were all the hacker. I had accepted these accounts as the contact requests seemed like they were legitimate. So, all the hacker had to say was 1. I added "Micheal Potter" today. 2. I added "Randy Parker" today and so on.
    They may have been asked to verify an address, this wasn't struggle for the hacker. For me, the hacker had to do a simple WHOIS lookup on my domain. The majority of people have their address openly available somewhere, I know for sure that my address is on many forums, websites etc. So just stating your address, is definetely not enough information.
    Shortly after, my email address must have been changed and it is surprising that Skype have not done something about this common flaw in their security.
    How can this be resolved?
    Not allow the changing of emails on accounts - if you have an issue accessing your email. you should have your email provider deal with it.
    Add further verification e.g. phone numbers, secondary emails that they must verfiy, proof of address sent over (you'd never see another company changing information without ID sent from that email address or further verification other than just confirming some account activity.
    Atleast check the IP address the support request was sent from!
    I hope you look into this problem and resolve it immediately.

    I watched as this happened, and many other around the same time. There are guides being sold on how to exploit your support team and steal accounts. I no longer feel safe using skype, and I am really scared right now. I share a lot of very personal things on skype  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Shame on you,
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

  • Urgent.  Issue with converted .mov files to avi not working in Premiere.

    I am trying to import video files that I have converted from .mov to .avi through OjoSoft Total Video Converter and anytime I try to put a file into the work area, the video goes to Video 1, and Audio goes to Audio 4.  When I try to play it I get no audio, and the video jumps from frame 1 to frame 2.
    Does anyone know a good converter or know the best way to convert and what filetypes to do so?  They work converting them as MP4 video files, but I like avi's better.
    I have tried converting the .mov to mpeg4 and H.264 (Both with audio as MP3).  They will play in Windows Media Player after convert but not in premiere...
    I am running Premiere CS4 on Windows7 with no direct codec packs installed.  I opened a video/audio file that I worked on before with no issues...video/audio run flawlessly in Premiere.
    Please help!

    What are the codecs in the original MOV files and what are the codecs after conversion? Use GSpot to identify them.

  • URGENT: Mail Issues

    All,
    I have the following issues in the Coldfusion Server. In the
    mail log I'm seeing the following issues logged. Where all the
    emails are valid emails. I just made them xxxx, yyyy inorder to
    protect their identity.
    Invalid Addresses; nested exception is: class
    javax.mail.SendFailedException: 554 <[email protected]>:
    Recipient address rejected: Relay access denied
    Mar 29, 2007   9:36 AM   Error   0  
    Invalid Addresses; nested exception is: class
    javax.mail.SendFailedException: 554 <[email protected]>:
    Recipient address rejected: Relay access denied
    Mar 28, 2007   8:18 PM   Error   0  
    Invalid Addresses; nested exception is: class
    javax.mail.SendFailedException: 554 <[email protected]>:
    Recipient address rejected: Relay access denied
    Mar 28, 2007   8:02 PM   Error   0  
    Invalid Addresses; nested exception is: class
    javax.mail.SendFailedException: 554 <[email protected]>:
    Recipient address rejected: Relay access denied
    And many more such entries. Any idea what is going
    wrong???

    Relay Access Denied is a security restriction that is set by
    the SMTP server. On the SMTP server you restrict relaying by IP,
    domain, subnet etc... Try and contact your SMTP Server
    Administrator to ensure that 'relaying' is allowed for the machine
    that CF is on or try a different mail server.

  • Some urgent chart issues : Lost labels & erroneous decimal places

    Hello everybody,
    we have some new and really urgent problems with some charts.
    Lost labels
    Like you can see in the figure below, our charts sometimes loose some lables on the graphs.There are some different scenarios for the problem.
    1) Two neighbouring bars have similar values and similar height. So the labels would overlap. In that cases, the charts loose one of the two labels. (see the yellow markers on the bars in the figure below)
    2) A chart´s graph tends to the maximum scale of its surrounding container div. The chart components then often "decide", that they do not have enough space for a label and so do not display these labels (line in figure below).
    Is there any possibility to fix these problems? Manipulating the charts via css doesn´t work, because the missing elements are not created at all. So there isn´t any element in the DOM that could be adressed.
    Erroneous decimal places
    In addition to the problems above, we have another one that causes ugly headaches. The values in some charts have 14 decimal places. Settings in the query (we use BW queries as DataSrc) or in the initial view are completely effectless. First we supposed that the problem correlates with some chart types, but in the meanwhile we get the problem with almost all types.
    Is anybody out there with similar problems or any ideas to fix the problem?
    Thanks so far & kind regars,
    Sebastian

    Hi Tammy,
    thank you for your very quick response. I´m working with IE 10.0.9200 and Design Studio 1.2 SP1. The Application runs normally on a BOE-Server. but the problems occur even when i run the application locally.
    But first of all i will check the thread you recommended.
    Thanks for your help!

Maybe you are looking for

  • Error while opening list workflow in SharePoint designer 2010

    Hi, I am trying to open list workflow in SharePoint designer 2010,its showing me the following page. Please help me how will be able to edit the workflow. While i click on "export to visio",its showing the error as "SharePoint designer encountered an

  • My iPod touch 3rd generation is not sync with my macbookpro

    i have an itouch 3rd genetration and is not sync with my macbookpro, is not charging either,,, help

  • Spry Server Include? code too laugh at lol

    hello i havent a clue what im doing with includes but im trying to make all my pages have the same spry navigation menu i looked over many tutorials on this and i have done what thay said but its jus not working heres my code it is unfinnished and no

  • What software do i need to play sound for MPEG-1 Muxed or MPEG-2 Muxed?

    i converted one of my video files but it only plays the vidoe but no sound. according to "article" on this webpage, I need speical software to play sounds for MPEG-1 Muxed or MPEG-2 Muxed files. WHAT SOFTWARE DO INEED?! Please and thank you

  • Camera Raw Corrupting Files

    I have many photos taken on a Leica P&S. It records record raw format and jpg. Some of the photos were actually of important subjects that I would like to preserve. I have recently noticed that the Raw files become corrupted when I open them in the C