How to determine different errors during update database with JDBC 2.0

During updating my database (MS Access 2000) using JDBC 2.0, I entered a value for the primary key field which has existed
in the database. However, when executing the method "udpateRow()" it gives me an error message "Error in row" and the
database was not updated.
When I update an Integer field with a non-integer value (e.g: Characters ), it also gives me the same error message. When I
update a Date field with a non-date value, it still displays the same error message.
How can I determine for each of the cases from the SQLException thrown that the actual error has occurred since I want to
display a different customized message indicating the different errors that occurred during updating??
Currently, part of my code is as follows:
          int currentRow = rs.getRow();
          String values[] = new String[ rsmd.getColumnCount() ];
          // Initialize values[] begins here:
          for( int count = 1; count <= rsmd.getColumnCount(); count++ ) {
               rs.updateObject( count, values[ count - 1 ] );
          try{
               rs.updateRow();
          catch( SQLException e ) {
               System.out.println( e.getMessage() );
               rs.cancelRowUpdates();
               rs.absolute( currentRow );
Can someone please help me solve this problem?? THANKS.. :)

Rather than attempting to figure out which column value causes the update to fail, I would try validating the input data before you attempt to use it in a SQL update. Of course, this would only be useful if you know what data types the inputs are supposed to be in advance of running the update.
William

Similar Messages

  • SQL Server error during create database through jdbc

    Hi ,
    Can anybody figure why I get the following exception
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Line 1: Incorrect syntax near '9876'.
    at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
    I am trying to create a new database through jdbc, I use only numeric characters in the database name.
    I can create the same database through SQL Enterprise Manager.
    -vikram

    The name of the database is 9876?
    Plan A: save yourself trouble and start database/table/column names with a letter.
    Plan B: if you really must, try quoting the database name: create database "9867".

  • Error while updating database using jdbc receiver adapter

    Hi All,
    I am trying to update a single record using jdbc receiver adapter.
    This is my the message that is getting created..
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:Data xmlns:ns0="urn:Test">
    - <STATEMENT>
    - <TABLENAME ACTION="UPDATE_INSERT">
      <TABLE>ORDERS</TABLE>
    - <ACCESS>
      <OrderID>99999</OrderID>
      <CustomerID>VICTE</CustomerID>
      <EmployeeID>3</EmployeeID>
      <ShipAddress>VICTE</ShipAddress>
      </ACCESS>
    - <KEY>
      <OrderID compareOperation="EQ">99999</OrderID>
      <ShipAddress compareOperation="EQ">VICTE</ShipAddress>
      </KEY>
      </TABLENAME>
      </STATEMENT>
      </ns0:Data>
    But in Adapter Monitoring i am getting the following error..
    <i>Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'ORDERS' (structure 'STATEMENT'): java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'VICTE'.</i>
    Regards,
    Rahul

    Rahul,
    > In this case i believe the interface has to be synch.
    > So what will the response message type be like..
    Not necessary. UPDATE can be asynch as well.
    Can you turn the trace on like pointed by Michal and then you can see the Query in the Audit Log of the adapter montioring. Try to execute the same query from your DB Client like TOAD and see what is the Syntax error you are getiing.!
    The problem looks like some field has some dataype / column name mismatch.
    Regards
    Bhavesh

  • Error when Updating database Statistics

    Hi all,
       I'm installing Database instance Of SAP R3E 4.7 extension set 2 SR1 on Window 2003 , orcle 9.2 (patch 9.2.0.8.0) . I got an error while Updating database Statictics is processing. How can i solve this problem
    Log error is:
    WARNING 2007-09-12 14:14:26
    Execution of the command "C:\usr\sap\C11\SYS\exe\run/brconnect -u / -c -f crsyn -o SAPC11" finished with return code 3.
    Output: BR0801I BRCONNECT 6.40 (45)BR0252E Function _popen() failed for '( C:\oracle\c11\920\bin\SQLPLUS /nolog ) < \nul 2>&1' at location BrPipeOpen-4BR0253E
    errno 2: No such file or directoryBR0272E Execution of program '( C:\oracle\c11\920\bin\SQLPLUS /nolog ) < \nul 2>&1' through pipe failedBR0303E Determination of Oracle version failed
    BR0801I BRCONNECT 6.40 (45)
    BR0252E Function _popen() failed for '( C:\oracle\c11\920\bin\SQLPLUS /nolog ) < \nul 2>&1' at location BrPipeOpen-4
    BR0253E errno 2: No such file or directory
    BR0272E Execution of program '( C:\oracle\c11\920\bin\SQLPLUS /nolog ) < \nul 2>&1' through pipe failed
    BR0303E Determination of Oracle version failed
    BR0280I BRCONNECT time stamp: 2007-09-12 14.14.26
    BR0804I BRCONNECT terminated with errors
    BR,
    Keng
    Message was edited by:
            Prachya Pantuyakorn

    they should normaly exist in the database.
    try to run
    sqlplus /nolog
    connect / as sysdba
    select username from dba_users;
    put if the don't exist:
    sqlplus /nolog
    connect / as sysdba
    create user "OPS$COMPUTERNAME\NW4ADM" identified externally;
    grant sapconn to "OPS$COMPUTERNAME\NW4ADM";
    grant sapdba to "OPS$COMPUTERNAME\NW4ADM";
    the rest should be part of note 50088
    peter

  • ME 808: System error: error during update Table EKAB

    Hi,
    Couple of years ago, during carve out, one of the contracts was deleted.
    A PO created against that contract carries some open quantities. Now our purchasing wants to close this PO, either by changing the quantity to delivered quantity (delivered quantity is lesser than PO quantity), or by checking the delivery complete box. But they are not able to do so, as there was no contract number exists in the system table.
    I propose to create a contract with the same number mentioned in the PO and then to change the quantity in the purchase req and PO. However now the system issues a dump error message "ME 808: System error: error during update Table EKAB".
    Can anyone help how to resolve the issue?
    Any body had similar situation?
    Thanks for your help.
    Regards,
    Shiva

    Hi,
    I am not sure how the external consultants deleted this contract during carve out.
    Our division was bought out from another company and moved the data to our SAP system.
    I checked the OSS and found note 922427 could resolve the issue.
    Thanks for your response.
    Regards

  • Customer Coversion Using Interface Table - Error during update

    I need to import customers from legacy applicatiion and is planning to use standard customer interface for that. For testing, I am able to create customers with hardcoded values. But while I try to update the same customer record (again using hard coded values), it gives me error and is not generating the error report as well. I am getting the following error during update:
    racudc: ORA-20212: Enter valid Billing Fields.
    ORA-06512: at "APPS.ADVOAR_CUST
    racudc: Error updating customers.
    or
    racudc: updated 1 partiesracudc: Partyrel 1 parties
    racudc: ORA-20210: You have edited one of the following fields, Extended Billi
    racudc: Error updating customers.
    Also it seems we can not update an address, site_use_code, or PRIMARY_SITE_USE_FLAG using customer interface.
    The following is the test record I inserted for updating the customer I created and ran the customer interface:
    insert into ra_customers_interface
    (ORIG_SYSTEM_CUSTOMER_REF
    ,INSERT_UPDATE_FLAG
    ,CUSTOMER_NAME
    ,CUSTOMER_STATUS
    ,LAST_UPDATED_BY
    ,LAST_UPDATE_DATE
    ,CREATED_BY
    ,CREATION_DATE
    ,ORIG_SYSTEM_ADDRESS_REF
    ,ADDRESS1
    ,CITY
    ,COUNTY
    ,STATE
    ,POSTAL_CODE
    ,COUNTRY
    ,customer_attribute13
    values
    ('APP1-492503' --ORIG_SYSTEM_CUSTOMER_REF
    ,'U' --INSERT_UPDATE_FLAG
    ,'Pizza Hut - CDH TEST4' --CUSTOMER_NAME
    ,'A' --CUSTOMER_STATUS
    ,-1 --LAST_UPDATED_BY
    ,sysdate --LAST_UPDATE_DATE
    ,-1 --CREATED_BY
    ,sysdate --CREATION_DATE
    --,'Y' --PRIMARY_SITE_USE_FLAG
    --,'BILL_TO' --SITE_USE_CODE
    ,'APP1-492503-ADDR1' --ORIG_SYSTEM_ADDRESS_REF
    ,'1 River Road, Bldg 1' --ADDRESS1
    ,'SCHENECTADY' --CITY
    ,'SCHENECTADY' --COUNTY
    ,'NY' --STATE
    ,12305 --POSTAL_CODE
    ,'US' --COUNTRY
    ,'55'
    I am testing this in 11.5.10 env. Any help on this is appreciated.
    Thanks,
    MK

    Convert only the data you need. And the data you need is probably less than you think. For example, other than open invoices (invoices for which money is still owed), you probably don’t need to convert ANY old invoices. You may want to convert data on what was purchased (e.g., event registration, membership, product, etc.) but the actual details (e.g., payment type, payment date) are probably no longer significant.
    http://www.e-datapro.net/data_conversion.htm

  • Communication channel: error during update

    Hi,gurus:
    We are doring a soap2rfc scenario.
    After reactivating relavant object in ID,I found that the status of sender communication channel was "error during update" in RWB.Have you ever dealed with the problem?Any help will be appreciated!

    hii
    ask your basis guys to see the startup log of XI server...see if there is any error in it.. if there is any error in it, then restart your XI server.......go to SMICM....see if the ICM monitor is running fine.......If ICM is not running fine, then go to Administration->j2ee server->restart->yes and restart your j2ee engine of your XI server......
    VisualAdmin-Server-services- Tracelogs. Also can restart your adapter engine and can you exact error you can getin RWB.
    Regards

  • Communication channels error during update

    Hello,
    All the Communication channels of the XI QA system are showing a status "Error during Update"  Checked status of components in Runtime Workbench --> Component Monitoring. Red Alert on Adapter Engine The details of the Communication channel error below is:
    com.sap.aii.af.service.administration.api.AdminException: Unable to
    retrieve channel runtime status: EventException:
    com.sap.engine.frame.cluster.message.PartialResponseException: One or
    more of the destinations did not return a response. Response status:
    [303228750-RTOE,303228751-RTOE,303981451-OK].
    Has anyone encountered this before? Do you have any suggestions on where to look at to investigate on the cause of the problem?
    Thanks in advance.
    Regina

    Hi Regina,
    ask your basis guys to see the startup log of XI QA...see if there is any error in it.. if there is any error in it, then restart your XI server.......go to SMICM....see if the ICM monitor is running fine.......If ICM is not running fine, then go to Administration->j2ee server->restart->yes and restart your j2ee engine of your XI server......
    Thanks,
    Rajeev Gupta

  • ME11 update error : Error during insert EINE with key

    HI All,
    I am facing the below problem..For one particular user update request is failing in ME11 transaction.Error was found in function module name ME_UPDATE_INFORECORD.I also check if it is number range problem but it is not the case..
    Please help me out..
    Thanks in advacne.

    Hi,
    The problem is that only one user is getting sporadic failed update messages (since last 3-4 days) when using transaction ME11. The error as recorded in SM13 is "Error during insert EINE with key <Inforecord #> <Pur Org>".
    I checked the table EINE for the key mentioned in the above message and found that there is a 2 years old record with the same key. Now, what I do not understand is that while creating a new Inforecord, why does SAP comes up with an old number instead of generating a new one from the number range object. I tried to search on SDN as well as OSS Notes, but could not find any mention to this problem.
    And yes, it is an abend message with no short dump...
    Thanks,
    Gaurav
    Edited by: Gaurav Malhotra on Feb 24, 2012 3:08 PM

  • Error during update download

    I can't open my itunes
    there was an error during update download

    See... Unable to install or open > http://support.apple.com/kb/TS5376
    Also See this User Tip by turingtest2
    https://discussions.apple.com/docs/DOC-6562

  • [SOLVED] Error during update of LUKS header on device ./file

    dd if=/dev/zero of=./file bs=1M count=200
    cryptsetup luksFormat -s 512 -c aes-xts-plain64 -h sha512 ./file
    WARNING!
    ========
    This will overwrite data on ./file irrevocably.
    Are you sure? (Type uppercase yes): YES
    Enter LUKS passphrase:
    Verify passphrase:
    Error during update of LUKS header on device ./file.
    This only happens on my 1TB HDD (GPT, xfs filesystem).  I have 2 SSDs that do not throw the error. 
    I tested using a flash drive formatted as GPT and using xfs filesystem and it worked.
    Ideas?
    Last edited by not_sure (2013-03-01 02:50:32)

    Hmm... I didn't know you could do that. Are you sure it can? https://wiki.archlinux.org/index.php/Di … ison_table
    I thought dm-crypt basically did block level encryption.
    I guess this is a "virtual partition"? Maybe https://www.linux.com/community/blogs/1 … nux/280174 helps? It seems to mount it as loopback prior to encryption?
    Last edited by cfr (2013-03-01 01:07:16)

  • Error during update of Table VBAP (RC= 4, Key= 5096672)

    Hello experts,
    i am getting error as
    Update was terminated
    System ID....   Q70
    Client.......   999
    User.....   HPROLLSD
    Transaction..   VA02
    Update key...   4EF9258A885201B1E10080000A140014
    Generated....   28.12.2011, 18:08:25
    Completed....   28.12.2011, 18:08:25
    Error Info...   Error during update of Table VBAP (RC= 4, Key= 5096672)
    Please help me on this issue.
    Regards
    Narendra

    Hi,
    Relevant issue,go through the link it could be help you.
    Express document "Update was terminated" received from author
    Ram

  • Error Connecting to database URL jdbc:oracle:oci:@rmsdbtst as user rms13 java.lang.Exception:UnsatisfiedLinkError encountered when using the Oracle driver

    Trying to Install RMS application 13.2.2 and I get past the pre-installation checks and when I get to the Data Source details and enter the data source details with the check box checked to validate the schema/Test Data Source I get the following error:
    Error Connecting to database URL jdbc:oracle:oci:@rmsdbtst as user rms13 java.lang.Exception:UnsatisfiedLinkError encountered when using the Oracle driver. Please check that the library path is set up properly or switch to the JDBC thin client oracle/jdbc/driver/T2CConnection.getLibraryVersioNumber()
    Checks performed:
    RMS Application code location and directory contents:
    [oracle@test-rms-app application]$ pwd
    /binary_files/STAGING_DIR/rms/application
    [oracle@test-rms-app application]$ ls -ltr
    total 144
    -rw-r--r-- 1 oracle oinstall   272 Dec 7  2010 version.properties
    -rw-r--r-- 1 oracle oinstall   405 Jan 16 2011 expected-object-counts.properties
    -rw-r--r-- 1 oracle oinstall   892 May 13 2011 ant.install.properties.sample
    -rw-r--r-- 1 oracle oinstall 64004 Jun  6  2011 build.xml
    drwxr-xr-x 9 oracle oinstall  4096 Jun 16 2011 rms13
    drwxr-xr-x 3 oracle oinstall  4096 Jun 16 2011 installer-resources
    drwxr-xr-x 3 oracle oinstall  4096 Jun 16 2011 antinstall
    drwxr-xr-x 2 oracle oinstall  4096 Jun 16 2011 ant-ext
    drwxr-xr-x 5 oracle oinstall  4096 Jun 16 2011 ant
    -rw-r--r-- 1 oracle oinstall 11324 Dec 18 09:18 antinstall-config.xml.ORIG
    -rwxr-xr-x 1 oracle oinstall  4249 Dec 18 10:01 install.sh
    drwxr-xr-x 4 oracle oinstall  4096 Dec 18 10:06 common
    -rw-r--r-- 1 oracle oinstall 16244 Dec 19 10:37 antinstall-config.xml
    -rw-r--r-- 1 oracle oinstall   689 Dec 19 10:37 ant.install.log
    [oracle@test-rms-app application]$
    Application installation:
    [oracle@test-rms-app application]$ ./install.sh
    THIS IS the driver directory
    Verified $ORACLE_SID.
    Verified SQL*Plus exists.
    Verified write permissions.
    Verified formsweb.cfg read permissions.
    Verified Registry.dat read permissions.
    Verified Java version 1.4.2.x or greater. Java version - 1.6.0
    Verified Tk2Motif.rgb settings.
    Verified frmcmp_batch.sh status.
    WARNING: Oracle Enterprise Linux not detected.  Some components may not install properly.
    Verified $DISPLAY - 172.16.129.82:0.0.
    This installer will ask for your "My Oracle Support" credentials.
    Preparing installer. This may take a few moments.
    Your internet connection type is: NONE
    Integrating My Oracle Support into the product installer workflow...
         [move] Moving 1 file to /binary_files/STAGING_DIR/rms/application
    Installer preparation complete.
    MW_HOME=/u01/app/oracle/Middleware/NewMiddleware1034
    ORACLE_HOME=/u01/app/oracle/Middleware/NewMiddleware1034/as_1
    ORACLE_INSTANCE=/u01/app/oracle/Middleware/NewMiddleware1034/asinst_1
    DOMAIN_HOME=/u01/app/oracle/Middleware/NewMiddleware1034/user_projects/domains/rmsClassDomain
    WLS_INSTANCE=WLS_FORMS
    ORACLE_SID=rmsdbtst
    JAVA_HOME=/u01/app/oracle/jrockit-jdk1.6.0_45-R28.2.7-4.1.0
    Launching installer...
    To make sure I have connectivity from the app server to the database (on a database server) here are the steps followed:
    [oracle@test-rms-app application]$ tnsping rmsdbtst
    TNS Ping Utility for Linux: Version 11.1.0.7.0 - Production on 19-DEC-2013 10:41:40
    Copyright (c) 1997, 2008, Oracle.  All rights reserved.
    Used parameter files:
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = test-rms-db.vonmaur.vmc)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = rmsdbtst)))
    OK (0 msec)
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ sqlplus rms13@rmsdbtst
    SQL*Plus: Release 11.1.0.7.0 - Production on Thu Dec 19 10:46:18 2013
    Copyright (c) 1982, 2008, Oracle.  All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ ping test-rms-db
    PING test-rms-db.vonmaur.vmc (192.168.1.140) 56(84) bytes of data.
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=1 ttl=64 time=0.599 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=2 ttl=64 time=0.168 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=3 ttl=64 time=0.132 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=4 ttl=64 time=0.158 ms
    64 bytes from test-rms-db.vonmaur.vmc (192.168.1.140): icmp_seq=5 ttl=64 time=0.135 ms
    --- test-rms-db.vonmaur.vmc ping statistics ---
    5 packets transmitted, 5 received, 0% packet loss, time 4001ms
    rtt min/avg/max/mdev = 0.132/0.238/0.599/0.181 ms
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ uname -a
    Linux test-rms-app.vonmaur.vmc 2.6.18-128.el5 #1 SMP Wed Jan 21 08:45:05 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
    [oracle@test-rms-app application]$
    [oracle@test-rms-app application]$ cat /etc/*-release
    Enterprise Linux Enterprise Linux Server release 5.3 (Carthage)
    Red Hat Enterprise Linux Server release 5.3 (Tikanga)
    [oracle@test-rms-app application]$
    The database is created and all the batch file scripts have been successfully deployed.  Now working on the application server.  The  Weblogic server is installed and 11g forms and reports are installed successfully.
    Any help would be helpful.
    Thanks,
    Ram.

    Please check MOS Notes:
    FAQ: RWMS 13.2 Installation and Configuration (Doc ID 1307639.1)

  • How to connect mySQL database with jdbc

    Who can tell me how to connect mySQL database with jdbc? Thanks

    http://onesearch.sun.com/search/developers/index.jsp?and=connect+mysql&nh=10&phr=&qt=&not=&field=title&since=&col=devforums&rf=0&Search.x=24&Search.y=16

  • How to prompt for OU during OSD Task with SCCM 2012 R2?

    How to prompt for OU during OSD Task with SCCM 2012 R2?

    Hi,
    Here is an example on how to do it using a Variable prompt in Configuration Manager, It works the same way in SCCM 2007,
    http://www.the-d-spot.org/wordpress/2013/04/01/dynamically-join-computer-to-ad-ou-during-osd-with-sccm/
    Regards,
    Jörgen
    -- My System Center blog ccmexec.com -- Twitter
    @ccmexec

Maybe you are looking for

  • Change the email address with my account

    How can I change the email address associated with my otn login? thanks, don.

  • New W520 on order

    Hey all, Newcomer to Lenovo here. Considering I'm waiting on a W520 (i7-2760QM, 4GB, 2000M, 500GB 7200RPM)  and have indeed read back quite a bit on these forums, some of you are surely questioning "what's wrong with this guy?" Simply put, Dell Preci

  • Concept of Awkey

    Can anyone tell me what is the concept of the awkey field in SAP FI (bkpf). I know its the concatenation of doc no (belnr) and the fiscal year (gjahr). But what is it about? I have a situation where I dont have a doc no (belnr) coming from table j_1b

  • Creating Collection Membership rules

    I'm looking to create some rules for collections that will automatically include all Windows 7, 8 machines into one collection and all server OS's in another collection. I got as far as creating a rule based on Operating System Name and Version but I

  • Install of 30 day Photoshop trial not working, help!

    Hi, I'm trying to install and use the 30 day trial of Photoshop... The download and install seemed to go smoothly, but now when I click on the "ADBEPHSPCS3_WWE" icon on the desktop, it does the whole 'extracting files' thing then check the box for "L