Another problem with updating in ms access

Hello there,
Me too has a problem with the update statement and ms access (using 2003).
I've read many other problems, but a way to the solution that worked for I didn't found :S
The strange thing with my problem is that i'm able to update integer fields in the database, but not varchar/text fields.
I'm not getting any exception back, the database is closed (i'm very sure), so HELP! :)
I'll show you the code i'm connecting with the database:
public void openDatabaseConnection() {
        // Eerst controleren of de DatabaseDriver wel aanwezig is.
        try {
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        catch (Exception e) {
            System.out.println("Looking for Class: " + e.toString());
        // Nu kan de connectie met de database opgezet worden.       
        try {
            theDatabaseConnection = DriverManager.getConnection("jdbc:odbc:Shawa","","ShaBaMa");           
        catch (SQLException ex) {
            System.out.println("openDatabaseConnection: SQLException: " + ex.getMessage());
            System.out.println("openDatabaseConnection: SQLState: " + ex.getSQLState());
            System.out.println("openDatabaseConnection: VendorError: " + ex.getErrorCode());        
    }The code for updating an integer field (wich is working!) is like this:
    public Customer cashCustomer(Customer aCustomer){
        PreparedStatement pstmt;
        ResultSet result;
        try{
            openDatabaseConnection();
            pstmt = theDatabaseConnection.prepareStatement("UPDATE customer SET aantal_bier = aantal_bier + ?, aantal_fris = aantal_fris + ? WHERE id=?");
            pstmt.setInt(1, aCustomer.getCashBeer());
            pstmt.setInt(2, aCustomer.getCashSoda());
            pstmt.setInt(3, aCustomer.getId());
            theDatabaseConnection.setAutoCommit(false);
            pstmt.executeUpdate();
            theDatabaseConnection.commit();
            pstmt.close();
            theDatabaseConnection.close();
        catch (SQLException eSql){
            System.out.println("Cash Customer: " + eSql.toString());
            System.out.println("Cash Customer: SQLException: " + eSql.getMessage());
            System.out.println("Cash Customer: SQLState: " + eSql.getSQLState());
            System.out.println("Cash Customer: VendorError: " + eSql.getErrorCode());
        return aCustomer;
    }Now the code for updating Varchar/text fields (wich is not working):
    public Customer editCustomer(Customer aCustomer){
        PreparedStatement pstmt;
        ResultSet result;
        try{
            openDatabaseConnection();
            pstmt = theDatabaseConnection.prepareStatement("UPDATE customer SET name=? , lastname=?, onderdeel=?, aantal_bier=?, aantal_fris=?, op_kaart=? WHERE id=?");
            pstmt.setString(1, aCustomer.getName());
            pstmt.setString(2, aCustomer.getLastname());
            pstmt.setString(3, aCustomer.getSection());
            pstmt.setInt(4, aCustomer.getBeer());
            pstmt.setInt(5, aCustomer.getSoda());
            pstmt.setInt(6, aCustomer.getId());
            pstmt.setString(7, aCustomer.getAddCash());
            theDatabaseConnection.setAutoCommit(false);
            pstmt.executeUpdate();
            theDatabaseConnection.commit();
            pstmt.close();
            theDatabaseConnection.close();
        catch (SQLException eSql){
            System.out.println("Updating Customer: " + eSql.toString());
            System.out.println("Updating Customer: SQLException: " + eSql.getMessage());
            System.out.println("Updating Customer: SQLState: " + eSql.getSQLState());
            System.out.println("Updating Customer: VendorError: " + eSql.getErrorCode());
        return aCustomer;
    }I can add and delete from the database. The thing with the ' ' didn't work for me too.
Anybody a solution for me??? plz plz plz!

You are updating zero records. Because you are filling in the parameter ofWHERE id=?with this code:pstmt.setString(7, aCustomer.getAddCash());The executeUpdate() method returns the number of records affected, if you wish to check that.

Similar Messages

  • Hi everyone,I have an Iphone 4S,when I updated iOS 7 my phone got slow,so please help me how to downgrade it to 6.1.3 or 6.1.3,I have another problem with iOS 7,I cant request my credit balancing,when i type *101

    Hi everyone,I have an Iphone 4S,when I updated iOS 7 my phone got slow,so please help me how to downgrade it to 6.1.3 or 6.1.3,I have another problem with iOS 7,I cant request my credit balancing,when i type *101# automatically calls and says "this number dows not excits",I wnat iOS 6.1.2 back ..

    sorry for my bad english ..

  • HT201210 nowadays have many user have problem with update to ios7 and need active with apple id maybe in the future in order escape from these problems must be stop use these products else. Because of simple user don't know about this technology and somet

    nowadays have many user have problem with update to ios7 and need active with apple id maybe in the future in order escape from these problems must be stop use these products else. Because of simple user don't know about this technology and sometime just hear from other user that it 's difficult to use then force they change phone that use to handle to another.

    It is a feature to discourage the theft of iPhones by making them useless if resold. It's not going anywhere. It's simple: just don't buy a phone until you make sure that the activation lock has been disabled.

  • TS1702 problem with updated find my iPhone app: when I attempt to open the FMi app, it tells me that I need to be a registered developer and run iOS7 to do so; is anyone else having this problem?  I got the app as a regular update to my existing FMi app w

    problem with updated find my iPhone (FMi) app: when I attempt to open the FMi app, it tells me that I need to be a registered developer and run iOS7 to do so; is anyone else having this problem?  I got the app as a regular update to my existing FMi app which worked great.

    The problem is being reported in the news media, yes. Apparently someone at Apple jumped the gun and uploaded the update before it was ready. They'll probably issue another update shortly, I would expect, but you can go here:
    http://www.apple.com/support/itunes/contact/
    and follow the instructions to report the issue to the iTunes Store. If you have a backup copy of the older version of the app, remove the newer version, restore the old version to iTunes on your computer, and resync.
    Update: Well, that was certainly quick. As of a short time ago, various sites are reporting that the Find My iPhone app is no longer displaying the previous error message. If it still is for you, delete it from your iPhone and re-download from the iTunes Store.
    Regards.

  • After having yet another problem with my MacBook Pro and having to wipe the drive, I am now unable to sync my iPhones etc without erasing all the music on them. Is there a way around this? I have no other library!

    After having yet another problem with my MacBook Pro and having to wipe the drive, I am now unable to sync my iPhones etc without erasing all the music on them. Is there a way around this? I have no other library!
    iTunes is a mess! It couldn't find it's own libraries and I was forced to create a new one. Now I don't know where my music is or if any's missing.

    columbus new boy wrote:
    How crap is that?
    It's not crap at all.
    It's not that simple. For example, I've 3500 songs on my MacBook but don't want them all on my phone, so I have to manually select each song again???
    There has to be a solution.
    Why not simply make a playlist with the songs you want on the iPhone?
    and maintain a current backup of your computer.

  • Problem with updating the PC Updater software

    Good evening (from Germany). I have a problem with updating my Nokia Software Updater. I can download the setup and I can execute this. But when the installation starts (0%) a error message appears. It's a problem with Windows Installer but I don't know how to solve the problem. Here is a picture with the exactly error message:
    http://img-up.net/?up=Nokia_probES8HJXXg.jpg
    I hope somebody knows the anser with this software...
    Greetings
    OS: Windows XP SP2
    Phone: Nokia 3110 classic Firmware: V 5.50
    Message Edited by dernamenlose on 24-Apr-2008 08:56 PM

    Good morning (from Denmark).
    I hve the same problem.
    OS: WinXP SP2
    Phone: N73.
    Greetings.

  • Another problem with SOAP sender

    I have another problem with SOAP scenario in a different environment (PI 7.0) from my earlier post.
    Scenario:
    Soap Sender -> PI -> Soap Receiver
    Following steps from GoogleSearch SOAP scenario in the SAP How-to Guide for SAP NetWeaver '04 entitled: "How To... Use the XI 3.0 SOAP Adapter" version 1.00 - March 2006.
    I have loaded in the api.google.com/GoogleSearch.wsdl file as an External definition and created the SOAP receiver as described in the How-to guide.  It takes a doGoogleSearch as input and sends back a doGoogleSearchResponse (Sync Call). 
    Note that the GoogleSearch.wsdl contains a complex type ResultElementArray that refers to ResultElement\[\], and a DirectoryCategoryArray that refers to DirectoryCategory\[\].  The ResultElement and DirectoryCategory types are defined in the GoogleSearch.wsdl file.
    Problem One:
    The generated WSDL for the SOAP sender contains the ResultElementArray and DirectoryCategoryArray types but it DOES NOT contain the required ResultElement and DirectoryCategory types.  XML Spy complains that this WSDL is not valid because the type ResultElement\[\] is not defined.
    Problem Two:
    I generate a SOAP message in XML Spy, provide values for the doGoogleSearch fields, and send.  In SXMB_MONI, the SOAP sender payload contains only the <key> value from the doGoogleSearch message body, i.e. <part name="key" type="xsd:string" />
    The other doGoogleSearch fields seem to be missing, i.e.
      <part name="q" type="xsd:string" />
      <part name="start" type="xsd:int" />
      <part name="maxResults" type="xsd:int" />
      <part name="filter" type="xsd:boolean" />
      <part name="restrict" type="xsd:string" />
      <part name="safeSearch" type="xsd:boolean" />
      <part name="lr" type="xsd:string" />
      <part name="ie" type="xsd:string" />
      <part name="oe" type="xsd:string" />
    Does anyone know why:
    (1) PI/XI seems to leave out the ResultElement and DirectoryCategory types from the SOAP sender service WSDL file?
    (2) The doGoogleSearch message seen in SXMB_MONI contains only the first <key> field, and not the other fields?
    Thanks for any help with this.

    I have another problem with SOAP scenario in a different environment (PI 7.0) from my earlier post.
    Scenario:
    Soap Sender -> PI -> Soap Receiver
    Following steps from GoogleSearch SOAP scenario in the SAP How-to Guide for SAP NetWeaver '04 entitled: "How To... Use the XI 3.0 SOAP Adapter" version 1.00 - March 2006.
    I have loaded in the api.google.com/GoogleSearch.wsdl file as an External definition and created the SOAP receiver as described in the How-to guide.  It takes a doGoogleSearch as input and sends back a doGoogleSearchResponse (Sync Call). 
    Note that the GoogleSearch.wsdl contains a complex type ResultElementArray that refers to ResultElement\[\], and a DirectoryCategoryArray that refers to DirectoryCategory\[\].  The ResultElement and DirectoryCategory types are defined in the GoogleSearch.wsdl file.
    Problem One:
    The generated WSDL for the SOAP sender contains the ResultElementArray and DirectoryCategoryArray types but it DOES NOT contain the required ResultElement and DirectoryCategory types.  XML Spy complains that this WSDL is not valid because the type ResultElement\[\] is not defined.
    Problem Two:
    I generate a SOAP message in XML Spy, provide values for the doGoogleSearch fields, and send.  In SXMB_MONI, the SOAP sender payload contains only the <key> value from the doGoogleSearch message body, i.e. <part name="key" type="xsd:string" />
    The other doGoogleSearch fields seem to be missing, i.e.
      <part name="q" type="xsd:string" />
      <part name="start" type="xsd:int" />
      <part name="maxResults" type="xsd:int" />
      <part name="filter" type="xsd:boolean" />
      <part name="restrict" type="xsd:string" />
      <part name="safeSearch" type="xsd:boolean" />
      <part name="lr" type="xsd:string" />
      <part name="ie" type="xsd:string" />
      <part name="oe" type="xsd:string" />
    Does anyone know why:
    (1) PI/XI seems to leave out the ResultElement and DirectoryCategory types from the SOAP sender service WSDL file?
    (2) The doGoogleSearch message seen in SXMB_MONI contains only the first <key> field, and not the other fields?
    Thanks for any help with this.

  • Problems with updating files in the cloud

    problems with updating files in the cloud

    What kind of problems?
    Have you recently upgraded to iCloud Drive on your iOS devices with iOS 8?
    Be aware, be careful, be prepared for iCloud Drive | TUAW: Apple news, reviews and how-tos since 2004

  • Adobe Photoshop Elements Problem with update 9.0.3

    Problem with updates Elements 9.0.3
    Message title was edited by: Brett N

    Then follow the rest of the directions here:
    Error "Patch cannot be applied" | Photoshop Elements 9.0.3 update | Windows
    http://helpx.adobe.com/photoshop-elements/kb/error-patch-cannot-applied-photoshop.html

  • Problem with update Photoshop, Illustrator and Indesign CS6

    Hi all. I have problem with update Photoshop, Illustrator and Indesign CS6 on OSx 10.8.4. Application are OK but update (bug fixies) not working. Update failed. (U44M1P7)

    Hi El Gondo,
    The following might explain and help solve the problem...
    U44M1P7 - Updates :
    http://helpx.adobe.com/creative-suite/kb/error-u44m1p7-installing-upda tes-ccm.html
    U44M1P7, U44M2P7 - Creative Cloud Help / Can't apply Extension Manager update 6.0.2 | Mac OS :
    http://helpx.adobe.com/creative-suite/kb/unable-apply-extension-manage r-update.html
    Thanks!
    Ankit

  • Problem with update MUSE CC 2014.2 (october 6). after upgrading to the new version of Muse crashes very often (out without notice).

    Problem with update MUSE CC 2014.2 (october 6). after upgrading to the new version of Muse crashes very often (out without notice).

    HELP! i can't get ANYTHING done in the new muse - keeps closing.  once it crashes - i can't get the file back open!
    i've lost all my work!
    from my desktop - when it stared happening was with the updated version:
    Logging in build 2014.2.1.10 started at: Mon Nov 03 13:36:38 2014
    ========================================
    [00:00:42.416] Opening file '\\D-LAPTOP\_websites\dsbees muse\dsbees.muse' with status:success size:9797632 mod Date:Tue Sep 23 15:51:42 GMT-0500 2014 highestUID: 3548
    [00:01:03.898] Preparing to Save As over "\\D-LAPTOP\_websites\dsbeesTWO\dsbeesTWO.muse" exists: true
    [00:01:17.516] SaveAs complete for file '\\D-LAPTOP\_websites\dsbeesTWO\dsbeesTWO.muse' file size:9830400 mod Date:Mon Nov 3 13:37:51 GMT-0600 2014 highest UID:3551
    Build 232: Mon Nov 3 19:41:03 2014 UTC: Error: CSI: OOBE: Serial Number: Error Code: O-10 Error Message: Unable to retrieve the serial number (Note: this may not be an error)
    Build 232: Mon Nov 3 19:41:03 2014 UTC: Error: CSI: OOBE: Serial Number: Error Code: O-10 Error Message: Unable to retrieve the serial number (Note: this may not be an error)
    Build 232: Mon Nov 3 19:41:07 2014 UTC: Error: CSI: OOBE: Serial Number: Error Code: O-10 Error Message: Unable to retrieve the serial number (Note: this may not be an error)
    Build 232: Mon Nov 3 19:41:21 2014 UTC: Error: CSI: IMS: Connect: Error Code: I-200 Error Message: No Account
    Build 232: Mon Nov 3 19:41:21 2014 UTC: Unknown IMS error 'SHARED_NOACCT_ERROR' has occurred when retrieving IMS token.
    Build 232: Mon Nov 3 19:41:57 2014 UTC: Opening file '\\D-LAPTOP\_websites\dsbees muse\dsbees.muse' with status:This Adobe Muse site file requires a newer version of Adobe Muse. Please update to the latest version. size:9797632 mod Date:Tue Sep 23 15:51:42 GMT-0500 2014
    Build 232: Mon Nov 3 19:41:57 2014 UTC: This Adobe Muse site file requires a newer version of Adobe Muse. Please update to the latest version.
    Logging in build 2014.2.1.10 started at: Mon Nov 03 13:43:17 2014
    ========================================
    [00:00:21.481] Opening file '\\D-LAPTOP\_websites\dsbeesTWO\dsbeesTWO.muse' with status:success size:9830400 mod Date:Mon Nov 3 13:37:51 GMT-0600 2014 highestUID: 3551
    [00:00:30.373] AssertInDebug: Unable to run recovery. User file remains locked after 5 second pause.-assertInDebugOnly+DataBase/recover+MuseSite$/recover+MethodInfo-2886+DataBase$/run Recovery+apply+UIComponent/callLaterDispatcher2+UIComponent/callLaterDispatcher+end stack
    [00:00:30.404] Failed to recover file:\\D-LAPTOP\_websites\dsbeesTWO\dsbeesTWO.muse
    [00:00:30.420] Calling openConnection for file that doesn't exist? C:\Users\Owner\AppData\Roaming\com.adobe.AdobeMuseCC.2014.2\Local Store\Recovery\JXRoDn335LE0UosOdoStnQ Parent folder exists.
    [00:00:34.429] open of SQL connection failed for C:\Users\Owner\AppData\Roaming\com.adobe.AdobeMuseCC.2014.2\Local Store\Recovery\JXRoDn335LE0UosOdoStnQ
    [00:00:34.429] Failed to open mini-save connection B "C:\Users\Owner\AppData\Roaming\com.adobe.AdobeMuseCC.2014.2\Local Store\Recovery\JXRoDn335LE0UosOdoStnQ" Doesn't exist. Folder exists. error:SQLError: 'Error #3125: Unable to open the database file.', details:'Connection closed.', operation:'open', detailID:'1001'
    [00:00:34.429] EXCEPTION:[SQLC/internalOpen] SQLError: 'Error #3125: Unable to open the database file.', details:'Connection closed.', operation:'open', detailID:'1001'-SQLConnection/internalOpen+SQLConnection/open+DataBaseConnectionWrapper/o penConnection+MethodInfo-28954+EventDispatcher/dispatchEventFunction+EventDispatcher/dispa tchEvent+MethodInfo-28938+end stack
    [00:00:34.445] AlertAndExit because of: [SQLC/internalOpen] SQLError: 'Error #3125: Unable to open the database file.', details:'Connection closed.', operation:'open', detailID:'1001'

  • Problem with updating adobe ilustrator CS6

    Hi
    I have problem with updating adobe ilustrator CS6. Error code: U43M1D204

    Please see the below similar discussions:
    http://forums.adobe.com/message/4913117#4913117#4913117
    http://forums.adobe.com/message/4169374
    Thanks!
    Ankit

  • I am having problem with updates CS5

    Hi,
    I am having problems with updating my CS5. I keep getting an error message "There was an error downloading this update. Please quit and try again later"
    Can you please help?
    Thank you
    Eli B

    See if doing it manually works
    All updates start here and select product, read to see if you need to install updates in number order, or if the updates are cumulative for the individual product http://www.adobe.com/downloads/updates/

  • Having problem with updating to 10.6.6 , my software now is 10.5.8, when the my mac is tellin me that i have already update to the lastest software when i haven`t :/ help !

    having problem with updating to 10.6.6 , my software now is 10.5.8, when the my mac is tellin me that i have already update to the lastest software when i haven`t :/ help !

    You need to find a store selling it and purchase it. If you buy it from an online store, it comes in the form of a DVD shipped to you.
    Unless Apple or someone with a site license applicable to you says otherwise, you can't download it.
    (60044)

  • Hello. i have a problem with updating illustrator CC 2014. i succeed updating indesign CC 2014

    hello. i have a problem with updating illustrator CC 2014. i succeed updating indesign CC 2014 & photoshop CC 2014, but every time i try to update illustrator CC 2014, its failed.
    how can i solve this problem?

    Link for Download & Install & Setup & Activation problems may help
    -Online Chat http://www.adobe.com/support/download-install/supportinfo/

Maybe you are looking for