Resultset Update in a Event !

First i do the connect with mysql 4.1.11 and mysqlconnector 5.15..
url = "jdbc:mysql://" + server + "/dbname?user=user&password=pass";                         Class.forName("org.gjt.mm.mysql.Driver").newInstance();             connect = DriverManager.getConnection(url);                                     System.out.println(url);                             System.out.println("Connection successful");
then the i do a normal query
            query = "SELECT * FROM betriebe where ergebnis is null and " +                 "((wieder_am is not null and wieder_am<now() and mitarbeiter=" + mitarbeiter  +") or "+                 "(mitarbeiter is null and wieder_am is null)) ORDER BY wieder_am desc, last_call limit 1;";             rS = state.executeQuery(query);             rS.updateString("ID_NUMMER","blub");  // this is working at this point !!!!             rS.updateInt("mitarbeiter",mitarbeiter);    // this is working at this point !!!!             rS.updateRow();                                    // this is working at this point !!!
Now my problem. I got a button on my GUI which has a Listener with this method
void cmd_nichterledigt_actionPerformed(ActionEvent e)     {         ResultSet tmp;         try         {             SimpleDateFormat formatter = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss");             java.util.Date currentTime_1 = new java.util.Date();             String dateString = formatter.format(currentTime_1);             System.out.println(dateString);             rS.updateString("Memo", txt_memo.getText()); // Here the error happens !                         rS.updateNull("ergebnis");             rS.updateNull("wieder_am");             rS.updateNull("mitarbeiter");             rS.updateInt("Wiedervorlage",0);             rS.updateRow();           } } Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.mysql.jdbc.ResultSetImpl.findColumn(ResultSetImpl.java:1059) at com.mysql.jdbc.UpdatableResultSet.updateString(UpdatableResultSet.java:2487) at aokframe.modify(aokframe.java:995) at aokframe.cmd_nichterledigt_actionPerformed(aokframe.java:1889) at aokframe$1.actionPerformed(aokframe.java:421)
idk what i am doing wrong. My resultset must be closed somehow. But i coundn´t found my mistake. thx for any help.

Hi,
You really shouldn't be mixing GUI and JDBC code.
I am guessing you have closed or re-executed the statement which generated the resultset.
I suggest reading about the Data Access Object (DAO) design pattern to limit the scope of your resultset objects and to separate JDBC code from the rest of your application.
Good luck!

Similar Messages

  • When I update a recurring event on my iPhone, it does not make changes to the calendar in ical or icloud.  Is anyone else having this issue?

    Updating a recurring event on my iPhone does not update the event in either ical or icloud.  If I add a new event on the iPhone it updates right away.  Is this a known problem?  Should I get rid of the recurring event and just make changes day to day manually?  I like having the recurring event set for my work schedule because it rarely changes, but when it does, I'd like to use my iPhone for the updates instead of carrying around my MAC Book all the time.
    Thank you!

    After connecting to iTunes, I noticed that "Back up to iCloud" was selected (in the middle of the screen on the "Summary" tab, under "Backup"), and "Last backed up to iCloud" reflected the time that I attempted to back up from my phone. Even now, the phone still says "Last Backup: Never," so there is clearly a disconnect. Hopefully Apple will fix this soon.

  • Add fields to maintenance view and update then using events

    Hi experts:
      I've created a table with 4 fields, one of them is userid. Also, there is a maintenance view to add new entries.
      I want to display user name when typing userid using events (1 or 21). I know how to do it if username is one of the fields of the table, but there is a requirement to not store username in the table, just userid.
    My question is: is possible to add a field into the maintenance view and update it using events but not store the value in DB?.
    Thanks in advance for your help.
    Regards,
    Carlos.

    In the save event just clear the entries of the field(user name) in the internal table.

  • Well im not able to updated all the events I had in the imovie, HELP

    Well im not able to updated all the events I had in the imovie, HELP

    I have started preparing a small Database application
    using JDBC with Swing.
    I want to dispaly all the Table names which are
    present in the Access Data Source. When i used the
    Standard query for this "Select * from Tab" as in
    SQL, an eror saying that "not able to resolve symbol
    'Tab' ".
    Can anybody please help me out to display the table
    names?That query
    Select * from tabwould work only for Oracle, as far as I know. There is no system table called Tab in Access.
    ***Annie***

  • I cannot access Content Library in iMovie - Content Library doesn't show on the iMovie screen and is greyed out when accessed through "windows" tab at the top. Also unable to update the projects/events (a suggested solution for a similar question).

    I cannot access Content Library in iMovie - Content Library doesn't show on the iMovie screen and is greyed out when accessed through "windows" tab at the top. Also unable to update the projects/events (a suggested solution for a similar question). I haven't had this issue before, I have always used the content library on the screen but haven't used this for about a month. How can I make the Content Library available?

    Thanks so much! I am backing up the entire computer now with an external hard drive - this should be fine right? And surely if I am backing up the whole computer these projects/videos will be backed up too? I wasn't sure how to do this any other way and I am clearly not great with tech issues. Once this is done and I am sure my projects/videos are safe I will do the delete and reinstall bit. Thanks for taking the time to help

  • In imovie 10.0.1 while trying to update projects and events in get a box telling me iMovie could not find any projects or events to update

    in imovie 10.0.1 while trying to update projects and events i get a box telling me that imovie could not find any projects or events to update. Help, please.

    Do you have Projects and Events form an earlier version of iMovie?
    Matt

  • Update Trainin and event via ABAP.

    I need to update training and event with external data. Once a month I receive the data in a file. But how can I do this using ABAP? Any good FM’s you can recommend?
    The objects I need to update/create is: Business Event Group, Business Event Type, Course and Person.

    BDC is the answer

  • I am attempting to update from iMovie 9 to iMovie 10. I have many movies with iMovie 9. Yet, on iMovie 10, when I press "update projects and events", it states "iMovie could not find any projects or events to update". What do I do?

    I am attempting to update from iMovie 9 to iMovie 10. I have many movies with iMovie 9. Yet, on iMovie 10, when I press "update projects and events", it states "iMovie could not find any projects or events to update". Somehow it doesnt' see all the movies I have on iMovie 9 library.  What do I do?

    I'm dealing with this same issue. At one point, it did recognize the Update function but then said it could not import the cache.mov and plist files which apparently means that imovie 10 can't see any of these past events. I can't figure it out.

  • Updated to iMovie version 10.0 Opened it. All my clips and projects were there. Then it crashed. Now no clips no projects. If I try and import them they are dimmed. If I try and 'update projects and events' a dialogue box says no files found.

    Have macbook pro 2012, running Maverick. Updated to iMovie version 10.0 Opened it. All my clips and projects were there. Then it crashed. Now no clips no projects. If I try and import them they are dimmed. If I try and 'update projects and events' a dialogue box says no files found.
    Have tried restarting computer, no joy. Help!!

    The reply from Nerval fixed it. It is very simple and it works.
    If you have a lot of Projects and  Events, leave the iMovie running for a long time. I had 160G and it took 4hrs. It is doing it in the background so don't shutdown too quick.
    Thanks Nerval.

  • Update Traning and Event

    Hi all,
    I need to update training and event with external data. Once a month I recive the data in a file. But how can I do this using ABAP? Any good FM's you can recommend?
    The objects I need to update/create is: Business Event Group, Business Event Type, Course and Person.

    Dear
    U can upload all the files through BDC as well as through LSMW.
    Just make the notepad sheet of all the data in the format of LSMW or BDC and upload it as and when required.
    Thanks

  • Is it possible to update projects and events after initial upgrade to 10.1.1 ?

    I just upgraded to FCPX 10.1.1 When I pressed the button ''UPDATE ALL'' one of my exterior drives was not connected. FCPX did not update projects and events on it. Is there a way to do it ?

    Hey Marc.
    You already said that.
    I asked you to post a screen shot of the locate dialog. It''s the one that appears after the one on the screeshot that Tom just posted.
    Russ

  • HT6012 While trying to update projects and events from a previous version of iMovie to iMovie '11, someone forced iMovie to quit.  Now when I start iMovie '11 and try to update, a message says no projects or events can be found?  Any suggestions?

    While trying to update projects and events from a previous version of iMovie to iMovie '11, someone forced iMovie to quit.  Now when I start iMovie '11 and try to update, a message says no projects or events can be found?  I know there are previous projects and events, and they definitely have not been updated because they do not show up in my iMovie'11 library, events, or projects.  Any suggestions?

    I also have Jolly's problem. I found the iMovie 9.0.9 folder and tried to launch the older version of iMove. It would not launch. I removed all of the iMovie preferences from the Preferences folder, removed iMove 10 from the applications folder, and restarted my Mac. iMove 9.0.9 still won't launch and I can't access my videos created with the older version of iMovie. Is there a way to uninstall iMovie 10 and reinstall iMovie 9.0.9?
    I am running Yosemitie on a  iMac.
    Paul

  • How to update old projects/events FCPX 10.1.1?

    So back when I updated FCPX to version 10.1, I updated most of my old projects and events to be consolidated into a new library. However, at the time I still left some of those projects/events in the "hidden" folder, so they were then placed in the "OLD FInal Cut Projects and Events" folder. I'm working locally on my computer because these are older, smaller projects.
    Now, when I go into FCPX to try to update these old projects and events, it won't let me update them. When I go to locate into the "OLD Final Cut Projects and Events" folder, it is all greyed out and won't let me update anything. Does anyone know a way around this?? Seems counterintuitive that they've made the old projects/events obsolete, because now I need to work off them!
    Specs: MBP 17 in. OSX 10.9.2, 2.53 ghz, 8GB RAM.

    The app needs to see those projects/event in the right place and in folders named Final Cut Projects and Final Cut  Events, respectively. Those two folders should be at the root level of an external (non boot) drive and/or in your Home Movies folder on your boot drive.
    If they are correctly named and located, FCP will see them when you chose Update Projects and Events from the Fiue menu…choose locate then navigate to the drive/folder.
    Russ

  • HT5958 updated10.1.1 and just opened FC, potponed project & events updating (not realizing what that ment) and now can't seem to get back to that. The above thread say "choosing File Update Projects and Events" but I do not see that option in my menu ???

    I updated Final Cut and I postponed updating Projects and Events (not understanding that this mean I would have nothing in FC when it opened!). Now I can''t find how to go back so i can update those. The help thread says to use "file > Update Projects and Events" but that opinion is not in my menu ????? I also restarted my laptop but that didn't give me the option either....

    The easiest way to fix the hosts file is to restore it from a backup that predates the modification, or to copy the unmodified file from another Mac. If you can't do that, then do as below.
    Triple-click anywhere in the line below on this page to select it:
    open -e /etc/hosts
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Paste into a Terminal window by pressing command-V. A TextEdit window should open. At the top of the window, you should see this:
    # Host Database
    # localhost is used to configure the loopback interface
    # when the system is booting.  Do not change this entry.
    127.0.0.1                              localhost
    255.255.255.255          broadcasthost
    ::1                                        localhost
    Below that, you may see some other lines. The first 9 lines should be exactly as above, apart from differences in the blank space within lines. Otherwise you can't use this procedure—STOP and ask for guidance.
    If the contents of the TextEdit window are as described, close it, then enter the following command in the Terminal window in the same way as before (by copy and paste):
    sudo sed -i~ '10,$d' /etc/hosts
    You may be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. If you don’t have a login password, you’ll need to set one before you can run the command. You may get a one-time warning to be careful. Confirm. Quit Terminal.
    If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. Log in as one and start over.
    That will fix the hosts file. There is now a copy of the old hosts file with the name "hosts~" in the same folder as "hosts". You can delete the copy if you wish. Don't delete the file named "hosts".

  • IMovie 10 crashes when attempt to update projects and events of external HDs.

    No way to update projects and events. Crash every time after few minutes of processing. Without external HD, works fine. To access older projects and work on it,  the only way seems to be uninstal iMovie 10 and return to 9.

    I do not have exactly the same issue, but iMovie 10 seems buggy as all get out and the alledged bugs cause the system to hang something fierce. There are a number of ways to trigger a crash, apparently, but it always proceeds the same way.
    The screen - the display - goes all big pixelly and wonky. The computer becomes partially unresponsive. Controls in the apple menu at left end of menu bar work, so I can try some things. Relaunching finder does not help. Logging out does not help. Only shutdown and reboot clears the screen.
    But after a few minutes of trying things in iMovie 10, it crashes again. The crash goes the same way each time, but it seems to be triggered by different things.
    I have added screen shot - (hope I added a screen shot, anyway. ) Too bad.  I think I like iMovie 10.
    Message was edited by: quaoar
    Message was edited by: quaoar

Maybe you are looking for