Algorithm arranging the Sequence of Records... UP and DOWN arrow

Is there some kind of algorithm for sequence of existing records with up and down arrows?
Move a record up (up arrow)
Move a record down (down arrow)
I think i need a scrollable resultset (update query) position = ++; etc somthing like that, can someone post a algorithm or sample code (scriplet)
Thank you in advance

I have a database field named secuence
Somthing is wrong with this code 10 dukes thank you in advance:
<%
Statement stmt3 = con.createStatement();
String iSeq =request.getParameter("seq");
String iID =request.getParameter("ID");
String action=request.getParameter("action");
if (request.getParameter("action") != null && action.equals("moveup")) {
          String sql = "update hog_evenementen " +
                    "set sequence = "+ iSeq +" - 1 where id = "+ iID +"; " +
                    "update hog_evenementen " +
                    "set sequence = (sequence + 1) where (sequence = "+ iSeq +" - 1) AND (id <> "+ iID +")";
          stmt3.executeUpdate(sql);
} else if (request.getParameter("action") != null && action.equals("movedown")) {
          String sql = "update hog_evenementen " +
                    "set sequence = "+ iSeq +" + 1 where id = "+ iID +"; " +
                    "update tblTest " +
                    "set sequence = (sequence - 1) where (sequence = "+ iSeq +" + 1) AND (id <> "+ iID +")";
          stmt3.executeUpdate(sql);
%>
Links that move records up and down:
<a href="evenement.jsp?action=moveup&id=<%=id%>&seq=<%=sequence%>"><img src="images/hog_omhoog_icon.gif" alt="Omhoog" width="12" height="14" border="0"></a></div></td>
<a href="evenement.jsp?action=moveup&id=<%=id%>&seq=<%=sequence%>"><img src="images/hog_omlaag_icon.gif" alt="Omlaag" width="12" height="14" border="0"></a></div></td>

Similar Messages

  • What is the Sequence of Master data and Transaction data R/3 to APO

    Hi guys,
    What is the Sequence of Master data and Transaction data R/3 to APO  through CIF?

    Hi,
    Master data,
    Material Indipendent data can be sent without any dependency.
    Material Dependent data sequence is as follow.
    Plant,
    MRP areas,
    Supply area,
    Material,
    MRP area material,
    planning material,
    ATP check,
    Purchase info recards,
    schedule agg,
    PPM or PDS (But before PPM or PDS  work center should send to apo) If PDS is sending then BOM should send before PDS.
    Transaction data.
    As per the business requirement what is planning in apo.
    Regards,
    Kishore Reddy.

  • Red record button and play arrow not working for videos. Any way to make work again?

    Red record button and play arrow quit working. Any way to fix?

    Try this and see if it works for you. Close the Camera App in the recents tray and reboot the iPad.
    Tap the home button once, then double tap the home button and the recents tray will appear with all of your recent apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the camera app.  Tap the home button again.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.

  • Is there a way to make the scroll wheel move up and down instantly like you could with previous versions, instead of moving slowly up and down?

    I've only recently updated my firefox to v 15.0.1 after using v 10 for so long, and I was wondering if there is a way to make the scroll wheel move up and down instantly without having it slowly crawl to it's spot?

    you can disable smooth scrolling.
    *Tools > Options > Advanced > General: Browsing: "Use smooth scrolling"

  • The right side scroll bar on firefox no longer has an up and down arrow after my last update. I have to fix this! Please help!

    After my last update with Firefox, my right-hand scroll bar no longer has up and down arrows. I really need to get them back. I'm using a Mac laptop.

    So the whole button is missing. I have no idea how to fix the default theme, since it is inside omni.ja, which is not accessible from just any archive handler, and I have not found any way to open it. My problems were with third party themes, and I managed to fix those by editing parts of the themes.
    Maybe you could set up scrollbars yourself by using a userChrome.css file plus images. You could get some tips by opening third party themes and looking at their scrollbars.css files.
    * http://kb.mozillazine.org/UserChrome.css

  • The up and down arrows for the Finder columns are difficult to bring into view - any way to make them easier or permanent?

    Hi -
    My husband works with multi-level folders, each with way more content than will fit on the screen.  He says that he can't get the up and down arrows to show up when he is looking for a file in Finder, or wanting to move or copy files to another folder several layers up.  They will apparently show up at times, but if he isn't fast enough, they disappear before he can get his mouse over to them.  He cannot use a Magic Mouse or a touchpad, which would solve the problem with finger gestures.  He thinks this happened when I put Lion on our computers several months ago.  My own files are not so extensive, and I can use a Magic Mouse, so I haven't noticed any problem.
    Was there a change in Lion - assuming that finger gestures would replace the up and down arrows onscreen?  Is there a workaround to get this functionality back?
    Any help would be appreciated, thanks!

    Canon cameras don't play will with other FireWire devices on the same bus. You could try disconnecting the WD drive and connecting the camera directly to the computer without and capturing to the internal drive. It should be fast enough for DV.
    One probably is that your version of FCE is not supported on the version of the OS you are running. The last version I think that works with that software is 10.4.10 or earlier.

  • Recently Firefox is no longer recognizing Macro Express macros, and the up and down arrows no longer work as they should.

    The Macro Express works in all other browsers (and programs), but no longer works in Firefox.
    The up arrow and down arrow works in all other browsers, but in Firefox, instead of moving down (or up) a line at a time, the page moves way, way down (or up). The Page Up and Page Down buttons work only part of the time... if a down arrow (or up arrow) was used, the Page arrows move the page but not one page up or down...many pages up or down.
    If I need to change back to an earlier version of Firefox, I will do this. Please tell me how to make things work the way they should work.

    You may have switched on caret browsing.
    *http://kb.mozillazine.org/accessibility.browsewithcaret
    You can press press F7 (on Mac: fn + F7) to toggle caret browsing on/off.
    *Tools > Options > Advanced : General: Accessibility: [ ] "Always use the cursor keys to navigate within pages"
    *http://kb.mozillazine.org/Scrolling_with_arrow_keys_no_longer_works
    *http://kb.mozillazine.org/Accessibility_features_of_Firefox

  • Why am I recently unable to use my mouse to scroll email topics or content?  I can only use the up and down arrows keys to scroll.

    Why am I recently unable to use my mouse to scroll email topics or content?  I can only use the up and down arrows keys to scroll. I am able to use my mouse to scroll through internet searches.  It only seems to have affected my email messages.

    Try a restart.
    Do a backup, using either Time Machine or a cloning program, to ensure files/data can be recovered. Two backups are better than one.
    Try setting up another admin user account to see if the same problem continues. If Back-to-My Mac is selected in System Preferences, the Guest account will not work. The intent is to see if it is specific to one account or a system wide problem. This account can be deleted later.
    Isolating an issue by using another user account
    If the problem is still there, try booting into the Safe Mode using your normal account.  Disconnect all peripherals except those needed for the test. Shut down the computer and then power it back up after waiting 10 seconds. Immediately after hearing the startup chime, hold down the shift key and continue to hold it until the gray Apple icon and a progress bar appear. The boot up is significantly slower than normal. This will reset some caches, forces a directory check, and disables all startup and login items, among other things. When you reboot normally, the initial reboot may be slower than normal. If the system operates normally, there may be 3rd party applications which are causing a problem. Try deleting/disabling the third party applications after a restart by using the application un-installer. For each disable/delete, you will need to restart if you don't do them all at once.
    Safe Mode - Mavericks
    Safe Mode - About

  • When I start my computer the safari icon jumps up and down and i get a note: 'Community Toolbar' I'm sorry, but Safari browser version you are currently using does not support the community toolbar.  How do i get rid of this

    when I start my computer the safari icon jumps up and down and i get a note: 'Community Toolbar' I'm sorry, but Safari browser version you are currently using does not support the community toolbar.  How do i get rid of this?

    Carolyn Samit has answered this question before.  I did it with this info.  Thank you Carolyn for your awesome help.

  • The scrollbar won't move when I click the up and down arrows or try to drag the bar, why is that?

    I just updated to version 4.0.1. After I updated and got the browser up again, I tried to scroll by clicking the bar and trying to drag it. This didn't work. So then I tried clicking the up and down arrows. This did not work either. The only way I am able to scroll is by using the up and down arrow keys on my keyboard.

    I just updated to version 4.0.1. After I updated and got the browser up again, I tried to scroll by clicking the bar and trying to drag it. This didn't work. So then I tried clicking the up and down arrows. This did not work either. The only way I am able to scroll is by using the up and down arrow keys on my keyboard.

  • HT1222 what is that little icon on the top with a lock and a arrow circle around it?

    what is that little icon on the top with a lock and a arrow circle around it?

    the_light_house wrote:
    Yeah, tried that. There's no symbol in that row of apps. I'm stuck on no rotation land. Running iOS 8.1.
    Ralph's post was for iOS 6 almost 2 years ago.
    Swipe up on the bottom on the screen to open Control Center.
    See this -> Screen doesn't rotate on iPhone, iPad, or iPod touch - Apple Support

  • The keyboard on my macbook air has stopped working. It was fine at lunch time now the up and down arrows move the page and the left and right take me into dashboard and out. The keys beep if pressed the only way to type is to use bluetooth keyboard.

    The keyboard on my macbook air has stopped working. It was fine at lunch time now the up and down arrows move the page and the left and right take me into dashboard and out. The keys beep if pressed the only way to type is to use bluetooth keyboard.please help

    "If none of the keys work, your computer may be showing a low battery alert that you can’t see.
    Connect your computer to an electric outlet or an external keyboard to see the alert".
    http://support.apple.com/kb/PH10680
    http://support.apple.com/kb/ts1381
    Reset PRAM.  http://support.apple.com/kb/PH4405
    Reset SMC.     http://support.apple.com/kb/HT3964
    Choose the method for:
    "Resetting SMC on portables with a battery you should not remove on your own".
    Best.

  • Move over the table rows using the up and down arrows using the javascript

    i had a dynamically generated html table in jsp .
    i need to move over the rows up and down .
    when the up and down arrow keys are pressed Highlight the row and after moving when i press the enter key other required page is to be displayed .
    please help me as soon as possible what events are to be used for the arrow keys and Highlight the row

    i got the code for it
    if (navigator.appName == "Microsoft Internet Explorer") {     
         document.onkeydown = processKeys;
    } else {
         document.onkeypress = processKeys;
    function processKeys(e) {  
         var keyID = (window.event) ? event.keyCode : e.keyCode;
         switch (keyID){
         // Key up.
         case 38:
              if (parseInt(currentRow) == parseInt(0)) {
                   // reached the top of the table; do nothing.
                   return true;
              } else {
                   // move one row up.
                   currentRow = parseInt(currentRow - 1);
                   setCurrentRow (currentRow, currentRow + 1);
                   return false;
              break;
         // Key down.
         case 40:
              if (currentRow == (numRows - 1)) {
                   return true;
              } else {          
                   currentRow++;
                   setCurrentRow (currentRow, (currentRow - 1));
    if (currentRow > VISIBLE_ROWS) {
    return true;
    } else {
                   return false;
              break;
         // enter key     
         case 13:
              var curRowId = boardMemberListTable.rows[currentRow].id;          
              return false;
              break;
    //onclick
    function selectRow(row) {
         inQuad3Edit = false;
         searching = false;
         var eleTableRows = boardMemberListTable.getElementsByTagName("tr");
         for (var i = 0; i < eleTableRows.length; i++) { 
              if (eleTableRows.id != row.id){
                   eleTableRows[i].className = "board-row-normal";
              } else {
                   currentRow = i;          
         row.className = "board-row-sel";

  • When im on my apple tv my mac will either start playing music or the volume will go up and down.  Its not on airplay or anything.  Everything work except for this.  thank you please answer ASAP. thanks

    When im on my apple tv my computer will either start playing music, or the voume will go up and down.  Its not on airplay, so i dont know whats wrong... please answer ASAP. Thank you so much!

    The computer is picking up the signal from the remote. Go into system preferences - security - general. Click the padlock and go into advanced. Check disable remote control infrared receiver.

  • My iPod Touch 4th generation is about a year and a half old. Today it got wet and I dried it off, but now it is turning on and off by itself and the volume is going up and down by itself. What do I do?

    My iPod Touch 4th generation is about a year and a half old. Today it got wet and I dried it off, but now it is turning on and off by itself and the volume is going up and down by itself. What do I do?

    First dry the iPod.
    How to fix a wet iPod or iPhone | eHow.comfix-wet-ipod-iphone.html
    Then
    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       
    Apple will exchange your iPod for a refurbished one for this price. They do not fix yours.
    Apple - iPod Repair price              

Maybe you are looking for