NextnPrevious pages and database update

Hi Folks,
Am hoping someone can point me in the right direction on figuring this out...
I have 120 individuals in the database with related fields. Instead of displaying 120 rows when I pull the data from the database, I've built Next/Previous pages for displaying them 30 to a page.
Here's the thing: This is an admin section, pulling names and IDs and fields (text, radio buttons, dropdowns, etc.) for data entry, or rather, database update.
So, after displaying 30 on the page you have a link on the bottom of the page to display the next 30. This page refreshes itself...
Either I have to cache the update info from each page and put a submit button for updating on the last page or, submit each page (30 at a time) until each succeeding page is done, one at a time. See what I'm getting at? I think I'd rather be able to submit 30 at a time instead of trying to cache all the data as you move from page to page but am having a hard time trying to figure this out.
I'm not sure what is best or just how to do the database insert/update since the Next/Previous CF code depends on the same page refreshing itself each time for the next pages.
Also, the first page of this 'group of NextPrevious pages' is dependant on it's previous page of "select school", so that the first NextPrevious page (and following ones) displays the individuals from that particular school - 30 at a time.
Can anyone point me in the right direction on this kind of database insert/update when used in conjunction with Next/Previous page links?
Thanks!
- ed

Thank ya'll for the ideas...
You know, before posting this I googled and googled and was surprised to find hardly anything addressing this. I would have thought it would be a fairly common way to perform edits on a large number of table rows - when you only want to display, say, 30 per page instead of 1200 records on one web page for admin edits.
With Meensi's and Furnis' suggestions and, a bit more thought... I kept thinking... It's pretty much like a shopping cart - holding a variable(s) from page to page. I know there's many ways to do this but the problem here lies in the page refresh holding variables with each refresh.
Seems logical to update All edits at one time - submit the form on the last page. I'm wondering, say as in the case you may have 1200 NextPrevious pages (!) - You'd want the user to do it in bits, page per page.
Since a clicked link clears session variables... maybe make the page refresh link (Next Page) a submit button and, on refresh, submit just "this particular page variables" and at the same time, the refresh loads the Next Page variables - updating the database in increments and display the next batch to edit.(?)
Does this make sense? I do want to make this a 'no-brainer' for the user - an admin section being most intuative is foremost to me...
The following is (stripped down) code I'm using to run the NextPrevious pages. I think maybe if I add the database insert somewhere in the code at the top of the page, coming from a form submit button that refreshes the page at the same time - maybe this would be the way to do it.
I'm not sure if there will be a problem wrapping the <form></form> around just the current variables on This Page. Maybe not. I think I may experiment with this, though...
Thank for your input on this.
Does seem like something like this, updates within NextPrevious pages would be a common practice and an easy fix doesn't it?
- ed
<!-- application with session variables and headersecure placed here -->
<!-- Per above - Put code here for database insert - An "if this page comes from the submitted form on this page" -->
<!-- The following is, more or less, ThisPage.cfm -->
<!-- Start displaying with record 1 if not specified via url -->
<CFPARAM name="start" default="1">
<!-- Number of records to display on a page -->
<CFPARAM name="disp" default="40">
<CFSET SchoolNameDropdown_z=structNew() />
<CFSET structAppend(#SchoolNameDropdown_z#, URL) />
<CFSET structAppend(#SchoolNameDropdown_z#, Form) />
<cfquery DATASOURCE="#application.dsn#" name="search">
etcetera
</cfquery>
<CFSET end=Start + disp>
<CFIF start + disp GREATER THAN data.RecordCount>
  <CFSET end=999>
<CFELSE>
  <CFSET end=disp>
</CFIF>
<head>
<link href="global.css" rel="stylesheet" type="text/css" />
</head>
<BODY>
<html>
        <cfset bgcolor = background_table_color_1>
  <cfoutput query="search" startrow="#start#" maxrows="#end#">
   <cfif bgcolor eq background_table_color_2>
    <cfset bgcolor = background_table_color_1>
   <cfelse>
    <cfset bgcolor = background_table_color_2>
   </cfif>
      #TRIM(variable01)#
      #TRIM(variable02)#       
        <input type="radio" name="Consent" value="Yes" <cfif Consent IS "Yes">checked</cfif>> Yes
        <input type="radio" name="Consent" value="No"  <cfif Consent IS "No">checked</cfif>>No
        <input type="radio" name="Assent" value="Yes" <cfif Consent IS "Yes">checked</cfif>> Yes
        <input type="radio" name="Assent" value="No"  <cfif Assent IS "No">checked</cfif>>No
        </cfoutput>
<CFOUTPUT>
<!-- Display prev link -->
  <CFIF start NOT EQUAL 1>
  <CFIF start GTE disp>
    <CFSET prev=disp>
    <CFSET prevrec=start - disp>
  <CFELSE>
    <CFSET prev=start - 1>
    <CFSET prevrec=1>
  </CFIF>
  <a href="ThisPage.cfm?start=#prevrec#"><<< Previous #prev# </a>
  </cfif>
<!-- Display next link -->
<CFIF end LT data.RecordCount>
  <CFIF start + disp * 2 GTE data.RecordCount>
    <CFSET next=data.RecordCount - start - disp + 1>
  <CFELSE>
    <CFSET next=disp>
  </CFIF>   
    <a href="ThisPage.cfm?start=#Evaluate("start + disp")#">Next #next# >>> </a>
  </cfif>
</CFOUTPUT>
</BODY>
</HTML>
<!-- end -->

Similar Messages

  • Search static pages AND database tables

    Hi,
    I'm working on a project in which I have static content
    pages, plus I'm creating a set of dynamic pages that display jobs
    and events listings etc. The dynamic pages are going to run off an
    access database.
    I'm need to create a search facility on the site. At present
    I'm planning to use a drop down box (or radio buttons ?) to allow
    the user to select which part of the site to search (main site,
    jobs or events), the selection will determine which search page the
    form query is passed to (site text search or database query search
    page).
    Am I approaching this correctly.
    Can anyone comment on possibly a better or alternative way of
    providing such a search option ? (searching both static pages and
    database tables)
    Thanks in advance.

    I guess something like <cffile action="read"
    file="C:\docs\shopping.html" variable="shoppingList">. Is there
    a way to do multiple files at once?

  • CcBPM, Async Messages and database update performance

    We have several business processes defined and running in XI 3.0. Some are being invoked as web services.
    Our performance/scalability is extremely poor. We believe the problem is the database, which apparently is being updated at a phenomenal rate. The database disk I/O is exceptionally high, and has been tracked to writing to the database container/table files and tranaction logs. The database has been carefully tuned, and we are rushing to migrate the db to a higher capacity machine.
    It would seem, based on documentation, that the database updates are a result of the asynch message interfaces we are using through the business processes. 
    The first question is are we correct in the above statement?
    The second question is are the db updates being done under a transactional scope, if so what is the isolation level of the update, and can we change the isolation level?
    Third question, if the updates are due to the asynch message interfaces, can we use synch message interfaces and reduce the database work? If so, how?
    Finally,

    I don't think you'll find a documented general number of application variables you can have on a single server. But I think you could get away with 400 variables without any trouble.
    Where you might run into trouble, though, is when you have multiple concurrent requests trying to read and change these values. You'll have to ensure that you single-thread write access to these variables using CFLOCK.
    Dave Watts, CTO, Fig Leaf Software
    http://www.figleaf.com/
    http://training.figleaf.com/
    Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
    GSA Schedule, and provides the highest caliber vendor-authorized
    instruction at our training centers, online, or onsite.

  • JDBC to IDOC scenario and database update the idoc number

    Hi SDNers,
    I am willing to pull data from a database table to generate IDOC in SAP and want to update the  DATABASE with IDOC number in a single scenario.
    Kindly suggest ?
    REGARDS!!
    SSR

    Hi,
        Please keep in mind that the idoc no generated in PI will be different than the one generated in SAP...for idoc...
    the correlation between the idocs in both systems is the message id...
    HTH
    Rajesh

  • Download failure on free purchases of Pages and OS update

    I tried to download Pages, listed as free, and you automatically get the Mavericks update.  After notice of "download failure" I went back to th App store and deleted the free purchases of the OS update and Pages. Now, when I go back to tha App store to try again, it shows Pages at $19.99. This is a brand new MacBook Air. How can I get the free Pages download?

    Using your link, I downloaded the new version. When I dragged the Firefox icon into the applications folder, it asked if I wanted the new version to replace the existing one, and I said yes. I was then told that it couldn't be done because I had insufficient privileges for some items. Is the reason for this that I didn't trash the old version BEFORE dragging the new one into the applications folder (under the assumption that "replace" meant that the old version was trashed as the new one was installed)? If not, it appears that I am back to the same problem I've had before.
    Since I'll be replacing this computer soon, it seems too troublesome to bother with this update. I'd just like the update reminders to go away!

  • BDC Error Session and Database update??

    Hi all,
    I am having Query about BDC Error Session. If I see the log of Error Session, then few Transactions are processed and few are in incorrect status.
    Those transaction, which are processed, Does it mean that it has updates the database successfully or Error Session will never update the Database?
    Thanks in advance.

    Thanks for your reply
    Message was edited by: Vipin Nagpal
    Message was edited by: Vipin Nagpal

  • API and Database updates

    Greetings!
    I've searched the archives for the forum and I can't find anything relating to my issue, so hopefully someone will have an idea of how I can get started on a new project.
    I have an SQL database that contains a row for each hour of each day. Every row contains a date (obviously for every one day there are 24 rows), an hour interval (1:00pm), the day of the month, the day of the week (Saturday), the Meridian, the Military time conversion (13:00), the week of the year, etc. This database is used for reporting purposes and it runs out of rows as of next week. I have been tasked with adding enough rows to last us another 2 years, which is about 17,000 rows.
    My colleague mentioned that I might be able to find what I need in the API and then write a little Java program that interfaces with my database to update the rows. Being completely new, I'm a little unsure as to how to go about researching this.
    I did poke in the API and I found the DateFormat class in the java.text package. It seems to have just about everything I need except for the military conversion.
    Does anyone have any thoughts on how I could use this class to write out these future rows to the database? One thing I should mention is that each row has a unique row-identifier that increments sequentially.
    If I have been unclear, please let me know and I will try to clarify. Any help or a nudge in the right direction would be greatly appreciated!
    Thank you!

    Java can acces SQL databases through JDBC. Here is a
    JDBC tutorial that can help you get started:
    http://java.sun.com/docs/books/tutorial/jdbc/index.htm
    i have looked at this tutorial yet there is a problem that i cant really deal with:-
    * am using net beans (windows xp), mysql server, and j/connector driver.
    * in net beans, in the RealTime Tab i can access my database in MySQL, but every time i write my code (in java)so i can connect with it and manipulate its tell me :
    SQLException: No suitable driver
    SQLState: 08001
    VendorError: 0
    my question is why can i access my database through 'Databases' in 'RealTime' tab, and not be able to make a simple connection with it when i run a simple code like this:
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class LoadDriverP {
    public static void main(String[] args) {
    try {
    Class.forName("com.mysql.jdbc.Driver");
    } catch (Exception ex) {
    // handle the error
    try {
    Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/world"," user", "pass");
    // Do something with the Connection
    } catch (SQLException ex) {
    // handle any errors
    System.out.println("SQLException: " + ex.getMessage());
    System.out.println("SQLState: " + ex.getSQLState());
    System.out.println("VendorError: " + ex.getErrorCode());
    could it be anything to do with CLASSPATH if it is please tell me what is this CLASSPATH and how can i change it.
    any help would be greatly apreaciated.

  • Safari can't load pages and software update don't work!

    Hi! Today I bought a time capsule to use it for time machine and for internet. After the installation and after the airport utility gives me the green light for all I try to enter a webpage. Safari doesn't worked at all. I try to use firefox and everything was ok. I try to connect with the ethernet port and the same here. The imail is fine and only with firefox can open pages but I have the same issue with the software update, it says that connection timed out! I don.t understand what happened I'll try some setting later but if someone have any idea pls help me. Thnx! It's the very first time I have an issue with my mac and I feel terible!

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the startup volume is a Fusion Drive or a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually login automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of the test.

  • Web Page and Database Design Problem

    Ok, so I'm trying to develop an app, but am having a few problems and need some advice/help.
    I have a webpage made up of jsp pages. These pages will contain forms that will either list info from the databse, or allow users to enter data to submit to the DB.
    So I will have Servelts that will process the form information.
    I also have written DAO interfaces for different tables. For example I have a config table which olds keys and there values.
    This information will only ever be displayed so I have an interface which getAll() and get(String key).
    I want to avoid putting code like below going into the DAO
    ctx = new InitialContext();
    javax.sql.DataSource ds
    = (javax.sql.DataSource) ctx.lookup (dataSource);
    conn = ds.getConnection();
    PreparedStatement stmt = conn.prepareStatement(query);
    ResultSet records = stmt.executeQuery();
    I'd prefer to make calls from my DAO getAll() method to another class which would create the connection, and query the db, and return the ResultSet, so that I can store/manipulate it anyway I wish, before passing the results back to the servlet.
    Problem is the records seem to come back null!

    ctx = new InitialContext();
    javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup (dataSource);
    conn = ds.getConnection();You should have a Connection Pool to create a connection and hand it out to whoover ask for it.
    Check out Hibernate
    Hibernate can manger your connection (you need to set the xml configuration first) .. It's another layer to encapsulate your JDBC connection, request, etc..
    Also check out Spring Framework. Spring can makes Transaction much more easy to implement (using aspect)
    It provides a handful of useful api for you to work with. like JdbcTemplate, HibernateTemplate.

  • Workflow..auto mailers and database updates

    Hi,
    My requirement is as follows...
    i have a report in which i have a register link. On click of the link i need to show a form in which i have to populate a multiple select box which will be populated by quering the DB with the current user ID. Once the list is populated, the user selects some of the values and clicks a button. Thereafter i need to insert the details in the DB for each and every entry selected in the list. The details to be populated need to fetched from another table in the Db. Also on every insert i need to send mailers to the corresponding entries...
    Please give me an idea as to how should i go about doing this.
    Few of my main concerns are.
    1. How do i use the current user id to fetch the details from the Db.
    2. How do i show a multiple select text box.
    3. What component do i use...like form or report..or anything else....
    4. how do i insert entries in the Db for every value selected in the select box. Also the details to be inserted are to be fetched from the Db itself in addition to some other parameters like, current user id, sysdate,etc...
    Also please let me know if there is any reading material for the same.

    There was a bug in checkURLFile. This is fixed with higher versions.

  • Insert and then update on next page

    I've made a registration page and I want the following page
    to display the newly registered account in text boxes so the user
    is able to check the information and edit it then update their
    newly made registration. Essentially the form needs to go two ways,
    to the update page first and then to the next page with all the
    newly added information. At present I have userID as an invisible
    primary key, it's important that the user doesn't see this (I don't
    know how relevant that is to my task).
    At the moment i've managed to get the update page to
    recognise the name from the previous page and display relevant
    details OR managed to add a newly registered user to the database
    but not both :(
    Please help,
    Thanks :D

    Sorry, no speaka PHP.
    I can tell you that's probably not the right part, though. It
    looks like
    it's preserving your query string for the redirect. Look
    toward the end of
    the behavior.
    "slowpoke115" <[email protected]> wrote in
    message
    news:evkvg7$fo6$[email protected]..
    > At present I dont have server,transfer or the redirect
    command in my code.
    > At
    > present the form goes to review.php once the form has
    been completed but
    > the
    > information is not sent. Heres the relevant bit of code,
    I'm still very
    > confused as to what I need to do to make this work, I'd
    of thought sending
    > the
    > form in two directions using jscript might of worked but
    it didnt. Heres
    > the
    > code I've got doing the after completion go to bit:
    >
    > $insertGoTo = "Review.php";
    > if (isset($_SERVER['QUERY_STRING'])) {
    > $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" :
    > $insertGoTo .= $_SERVER['QUERY_STRING'];
    >
    > I'll paste more of people need me to. I really do need
    help with this, my
    > trials running out, lol!
    >

  • I just updated my pages and now it won't load. This is on my iPad. The first version which has the latest version it can have 5.1 or something like that. I am trying to open a document and am worried that if I uninstall and reinstall I will lose all my do

    I just updated my pages and now it won't load. This is on my iPad. The first version which has the latest version it can have 5.1 or something like that. I am trying to open a document and am worried that if I uninstall and reinstall I will lose all my documents

    I just uninstalled it and am waiting for it to reinstall. I sincerely hope that I have not lost everything that I worked on so hard. Now that mobile me is gone, I have not been able to go between devices to transfer things. I was merely trying to take a document I had worked on and open it in pages, but it said my version was too old. When I updated, it wouldn't load. Now I cannot do anything. I hope that the reinstall fixes it without losing everything. Please advise!!! Yes, I am in panic mode.

  • Just updated my iphone 4s to the new IOS6 and now my wifi is bringing up an itunes page and will not connect?

    i just updated my iphone 4s with the new IOS6 update and now everytime i try to connect to my wifi it brings me to the apple page and will not connect to the wifi at all.. someone please help

    I have the same problem, no way to change the old username in icloud on my ipad after update to ios7. Enybody knows a solution or where to look for a solution?

  • I had to change my Apple ID and password in itunes. Now my icloud doesn't work and I can't update my apps on my iPhone. I have looked at suggestions on the community pages and apple suggestions but none of them are relevant to iOS 8.1.2  icloud just

    I had to change my Apple ID and password in itunes. Now my icloud doesn't work and I can't update my apps on my iPhone. I have looked at suggestions on the community pages and apple suggestions but none of them are relevant to iOS 8.1.2
    icloud just keeps bringing up my old email address & asking for my old password which doesn't exist anymore and when I try to sign out of icloud it wants my old password, when I tried to change my primary email back to the old one it wants me to verify it through an email address that doesn't exist. Please can you help me sort out this nightmare.

    Hi skippy2012trev,
    Welcome to the Apple Support Communities!
    I understand that you updated your Apple Id and password but now you are being prompted for the old information in iCloud. You are on the right track by changing the Apple ID back to the previous email address temporarily so that you can sign out. You should not need to verify the email address. After you edit the Apple ID back to the old email address and then sign out of iCloud on your iPhone, edit the Apple ID back to the address you would currently like to use. There is no need to change the password again, only the email address, unless you prefer to update the password again.
    If you're asked for the password to your previous Apple ID when signing out of iCloud - Apple Support
    Change your Apple ID temporarily
    If signing out and back in to iMessage or FaceTime didn't help, try these steps:
    Change your Apple ID to the Apple ID you used previously. You shouldn't need to verify the email address.
    Tap Settings > iCloud. Complete these steps only if the Find My [Device] setting is turned on:
    Scroll down and tap Sign Out, then tap Sign Out to confirm. If you're using iOS 7 or earlier, tap Delete Account, then tap Delete to confirm.
    Tap Keep on My [Device] or Delete from My [Device]. In either case, your data remains in iCloud and will be updated on your device when you sign in to iCloud again.
    Enter the password for your previous Apple ID.
    Change your Apple ID to the new email address that you want to use. You'll need to verify the email address.
    Return to Settings > iCloud and sign in with your new Apple ID.
    Cheers,
    Joe

  • I have a 2010 iMac 21.5, and have updated with Maverick. Now I can't open the pages or modify the keynote presentation I am working on.

    I recently updated my 2010 iMac 21.5 to MAVERICK. Now I have installed new versions of Pages and Keynote. I have been working on a KEYNOTE presentation that I am modifing for a new presentation at month end, and I can not insert new script. The template is blocked.
    Also, when opening an existing PAGES, I get the message that a new version must be installed and it directs me to the app store to buy it for $19.95. Even though these new editions were installed free with MAVERICK, do I now have to purchased these updates?

    Did you make the Keynotes presentation in the old or the new Keynotes, if you made it with the old version and try to modify it with the new there could be some incomaptibilites. Try opening the presentation with the original version of Keynotes which will probably be located in the Applications folder under iWork.
    Does the message state you may or must purchase an upgrade. For most tasks the old Pages will work on many occasions.
    I have the latest Pages to allow my devices to share over iCloud but I have not upgraded Numbers or Keynote as I do not require the functions the lastest versions provide.

Maybe you are looking for

  • 3600 Series Access Point Problem

    Have a AIR-CT5508-K9 Controller running 7.0.116.0 software. Just purchased 3 AIR-CAP3602I-A-K9 access points. When these try to join the controller we receive the following error message. %CAPWAP-3-UNSUPPORTED_WLC_VERSION: Unsupported version 7.0.116

  • What is this "multiple cell" warning?

    While i'am talking with mother, in the same time my dad is called me, (call waiting enabled) a missed call has occurred and when i drop the phone and look on the screen, i have 1 missed call: dad , but in the same screen i see a different warning (lo

  • RE: AP process with MM, AR process with SR

    Hi Gurus This is Ramakrishna, could you please give brief explain about the situations happen that are 1) AP with MM ( mm point of view which areas affected from invoice to clearing ) 2) AR with SD (  sd point of view which areas affected from invoic

  • Can't make start up items disappearing

    Hi, Everytime i start leopard there are two things starting automatically. I can't figure out how to make them not starting: 1 Finder opens some path on idisk, always the same path, though it wasn't there at last shut down 2 Automator want me to crea

  • TS1436 keep getting the error message saying " cd/dvd software not found". How do I fix this!?

    When trying to burn my playlist, I keep getting error message saying cd/dvd software not found.. I've tried uninstalling and installing itunes over and over.. and I still get the same message . I can burn in Windows media player but not in itunes. Pl