Need to update a record on page load. How? (ASP/VBScript)

The standard Update Record behavior requires a form on the page, plus a recordset to identify the value to be updated. In my scenario, the value for the record to be updated is already in the URL as the ID. I just don't know how to write it myself and Dreamweaver won't do this.
The page I want to do this on is a record detail page, so there is already a record ID already present in the querystring. The record is new until a user views it, and what I need is something that just writes a simple value to one field in the table for the record being viewed. This is it in a nutshell:
Using the value from the ID in the URL querystring, update the "viewed" field in a specific table with the value of "y".
This would be the first operation as the page loads and then the page would load and show the data that it already does.
I'd be happy with raw code is someone is generous enough to provide that, or perhaps some instructional help on reverse engineering the standard update record code generated by Dreamweaver. Or, if you know of any extensions designed to do this - I'd be interested in that too!
My app I'm working on is in ASP/vbscript.
Subject line edited by moderator to indicate server model

Good point! I wasn't thinking about how that would make the app vulnerable to sql injection.
The function I want to perform is similar to how an email changes from unread to read when you view it. I simple want the records being viewed to take on the status of being read or "viewed". Perhaps I'm going about this in the wrong way, but I've been planning to use a database field as the indicator of whether a record has a viewed status or not. Null value is new, and a value of "y" (yes) meaning the value is viewed/read.
If you have a better recommendation, I'm all ears.

Similar Messages

  • Update record on page load

    I need to update a record on page load. Basically, I need to
    keep track of new content for users, so if they've viewed it, it
    changes the viewed column from 0 to 1. any suggestions?

    I guess there is no requirement for a stored procedure here,
    though, is
    there? You could just have code on the page that executes
    before the <html>
    tag to update that record, no?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Dooza" <[email protected]> wrote in message
    news:g0rgk3$nm5$[email protected]..
    > jsteinmann wrote:
    >> I need to update a record on page load. Basically, I
    need to keep track
    >> of new content for users, so if they've viewed it,
    it changes the viewed
    >> column from 0 to 1. any suggestions?
    >
    > Create a stored procedure, then call it using a
    Recordset, passing the
    > user id and content id.
    >
    > Steve

  • I need to update specific records(of variable lengths) in a file. I can get the correct record but when I update it(add info), it overwrites part of the record following it. I am using labview 6.0

    I need to update specific records(of variable lengths) in a file. I can get the correct record but when I update it(add or change info), it overwrites part of the record following it. I am using labview 6.0. I need to be able to insert information into the middle of a file without disturbing the data before and after

    It's hard to give more specifics without more detail, but in general you're going to need to read in the entire file, split it into three pieces (everything before the record of interest, the record itself, and everything after the record of interest), modify the record, reassemble the three pieces in proper order, and write the whole thing back to the file.Of course if the file is very large you might not want to actually implement it this way, but conceptually at least, this is what you are looking at.If this file some sort of proprietary format?Mike...PS: this type of issue is why I really like databases...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • My HT BDV-N790W shows "needs network update" also my netflix doesnt load. can i get some help

    My HT BDV-N790W shows "needs network update" also my netflix doesnt load. Can i get some help, please.

    There's a lot there, so I'll start with the parts I can answer quickly.
    The "ACL found but not expected..." messages can be safely ignored, so says this article
    http://docs.info.apple.com/article.html?artnum=306925
    (look below all the "SUID" examples)
    I had changed my Desktop image earlier but when the "Installing 1 item" window came up it changed back to the back ground that you first see on your desktop after installation.
    Leopard installs updates a bit differently. If it's simply an application that does not change system files, it installs them like before, without having to restart. If the update is to the system, then you must immediately "restart," It then goes to that stars and purple screen to perform the installation. Before, it would do the installation while you still had control of the Mac and would prompt you to restart when it finished the installation. This change probably make things more secure and reliable, because you aren't allowed to do other things on the Mac while system updates are being installed.
    Please post back with the remaining point of concern.

  • I need an updated ios on my ipod.  how to i update it?

    i need an updated ios on my ipod.  how to i update it?

    To update
    Connect the iPod to your computer and update via iTunes
    iTunes 10 for Windows: Update and restore software on iPod, iPhone, or iPad
    A 2G to 4.2.1. Requires iTunes version 10.X. That requires a Mac with OSX 10.5.8 or later. With 1OSX 10.4.11 you can only go to iTunes 9.X which gets you as high as iOS 4.1
    A 3G to 5.1.1  Requires iTunes version 10.5 or later
      Identifying iPod models
    . Are you sure you really do not have a 2G iPod? Those can only go to 4.2.1
    Identifying iPod models
    iPod touch (3rd generation)
    iPod touch (3rd generation) features a 3.5-inch (diagonal) widescreen multi-touch display and 32 GB or 64 GB flash drive. You can browse the web with Safari and watch YouTube videos with Wi-Fi. You can also search, preview, and buy songs from the iTunes Wi-Fi Music Store on iPod touch.
    The iPod touch (3rd generation) can be distinguished from iPod touch (2nd generation) by looking at the back of the device. In the text below the engraving, look for the model number. iPod touch (2nd generation) is model A1288, and iPod touch (3rd generation) is model A1318.

  • Need to update mutli record in oracle forms - Urgent please

    Hi,
    We are using Oracle apps release 11i - Oracle forms 6i.
    I have a field "project_start_date" in project_block in a custom form. There is another multi-record block called role_block in the same custom form and it has a field named start_date. Requirement is when ever I make change in the project_start_date in project_block, that should reflect in role_block.start_date. I tried different means and could update only the very first record of the multi-record block - role_block. I need to update all the records in the role_block with the same project_start_date. Used looping and several other methods. But could not achieve. Any help is really appreciated.
    Thanks
    Akil

    Please first read this https://forums.oracle.com/forums/ann.jspa?annID=432
    We are using Oracle apps release 11i - Oracle forms 6i.I can't understand this together.
    I have a field "project_start_date" in project_block in a custom form. There is another multi-record block called role_block in the same custom form and it has a field named start_date. Requirement is when ever I make change in the project_start_date in project_block, that should reflect in role_block.start_date. I tried different means and could update only the very first record of the multi-record block - role_block. I need to update all the records in the role_block with the same project_start_date. Used looping and several other methods. But could not achieve. Any help is really appreciated.
    Thanks
    AkilIs there any relation between project_block and role_block ?
    Do u want to update corresponding column (specific filed) of role_block when updating project_start_date in forms? How may rows will be updated for one project_start_date update ? one or multiple or all ?

  • Oracle Forms - need to update multi-record block - Help needed asap

    Hi,
    We are using Oracle apps release 11i - Oracle forms 6i.
    I have a field "project_start_date" in project_block in a custom form. There is another multi-record block called role_block in the same custom form and it has a field named start_date. Requirement is when ever I make change in the project_start_date in project_block, that should reflect in role_block.start_date. I tried different means and could update only the very first record of the multi-record block - role_block. I need to update all the records in the role_block with the same project_start_date. Used looping and several other methods. But could not achieve. Any help is really appreciated.
    Thanks
    Akil

    Hi;
    For your issue i suggest close your thread here as changing thread status to answered and move it to Forum Home » Application Development in PL/SQL » Forms which you can get more quick response
    Regard
    Helios

  • Need to update multiple records using store procedure

    Hi i am trying to update multiple records using store procedure but failed to achieve pls help me with this
    for example my source is
    emp_name sal
    abhi 2000
    arti 1500
    priya 1700
    i want to increase salary of emp whose salary is less than 2000 it means rest two salary should get update..using stored procedure only
    i have tried following code
    create or replace procedure upt_sal(p_sal out emp.sal%type, p_cursor out sys_refcursor)
    is
    begin
    open p_cursor for
    select sal into p_sal from emp;
    if sal<2000 then
    update emp set sal= sal+200;
    end i;f
    end;
    and i have called the procedure using following codes
    set serveroutput on
    declare
    p_sal emp.sal%type;
    v_cursor sys_refcursor;
    begin
    upt_sal(p_sal,v_cursor);
    fetch v_cursor into p_sal;
    dbms_output.put_line(p_sal);
    end;
    the program is executing but i should get o/p like this after updating
    1700
    1900
    but i am getting first row only
    2000
    and record is not upsating...please help me with this
    thanks

    Hi Alberto,
    thanx for your valuable suggestion. but still i have doubt. the code which i have mentioned above might be simple but what if i have big requirement where i need update the data by using loops and conditional statement.
    and i have similar kind of requirement where i need to deal with procedure which returns more than one row
    my source is
    empno ename salary
    111,abhi,300
    112,arti,200
    111,naveen,600
    here i need to write a store procedure which accepts the empno (111) as input para and display ename and salary
    here i have written store procedure like this
    create or replace procedure show_emp_det(p_empno in emp.empno%type, p_ename out emp.ename%type,p_salary out emp.salary%type, p_cursor out sys_refcursor)
    is
    begin
    open p_cursor for
    select ename,salary into p_ename,p_salary from emp where empno=p_empno;
    end;
    and i have called this by using
    declare
    p_salary emp.salary%type;
    p_ename emp.ename%type
    v_cursor sys_refcursor;
    begin
    show_emp_det(111,p_ename,p_salary,v_cursor);
    fetch v_cursor into p_ename,p_salary;
    dbms_output.put_line(p_ename);
    dbms_output.put_line(p_salary);
    end;
    here i should get
    abhi,300
    naveen,600
    but i am getting first row only
    abhi,300
    but i want to fetch both rows...pls help me to find the solution

  • Old JSP pages loading // how to get new ones?

    I am new to the forum and hope that experts can help. I am running a JSP application on an Apache/tomcat setup.
    I encounter the problem that although I update a webpage (say 'example.jsp') with a date of 12 Jan 2009, the server continues to use a version of the page from many days before.
    Miscellaneous point: these pages are being accessed by jsp:include and jsp:forward.
    It seems like there is a hidden cache somewhere that the server likes to use in place of my updated pages.
    I'd be pleased for any solutions!

    Thanks everyone for the very helpful replies.
    There were a total of 4 problem files.
    Here are the results based on the suggestions received:
    1. The suggestion of deletion of the .java and .class files (to be regenerated automatically from the .jsp files) fixed 3 of the problems: " Occasionally, we get one that just wont recompile and I have to delete it from the work directory. A JSP is turned into a .java file and then compiled in to a .class file in this directory. Deleting it will cause the file to recompile. [tomcat home]/work/catalina/localhost/[war directory name]/org/apache/[path to the file]." I was a bit wary to delete the entire directory, but I went for it, and everything (including the numerous subdirectories) was automatically regenerated.
    2. There was still 1 problem file. I think that this file was somehow in the RAM of tomcat because the suggestion to shut everything down and restart took care of this last file: "Along with webapps folder in tomcat, there is a work folder. Open work.catalina.localhost. In localhost, you will find your application. Delete it. Deleting it will not cause any problem. Now again restart tomcat. Now you should get the new pages loaded."
    3. The following suggestion seems to be a very good one for my application (i.e., low traffic on a specialized site) that could prevent similar problems in the future: "If this is for development only and you´re using Tomcat, consider to set <context reloadable="true">. This will check for changes in the webapps folder at certain intervals and automagically redeploy/reload the changes. Don´t use this setting in production, it´s fairly expensive to let it check the webapps everytime. For other appservers, consult the appserver specific documentation for similar settings."
    Coming to this community was a very good idea with lots of excellent suggestions that fixed my problem! I had been frustrated by this for some months now. Thanks everyone!

  • HT4623 My acct says I need to update iTunes to new version. How?  From my phone? I already have the 6.0 update for phone. But it says I need iTunes update

    When I log into my PC to update my acct it says I cannot due to I need to update my iTunes version on my iPhone.  How!

    It's talking about iTunes. The program that runs on your computer. Not iOS, the operating system on your phone.
    On your computer, go to http://www.apple.com/itunes
    Download and install version 10.7. It is required to sync with iOS 6.

  • Need to rotate a swf on page load???

    Not sure if this is the place to ask this but I have a swf file embeded in a web page design.
    Now here’s the issue, the client wants to add more photos to it making it even larger.
    I would prefer not to make it larger but create 2 or 3 swf files that would randomly load when the webpage is refreshed or reloaded.
    Is there a way to code a random swf loading in HTML?
    Would I use javascript? I googled and found nothing on the subject.
    Thank you

    Would you recommend php or javascript to achieve my goal. 
    I think that depends on your site and your comfort level with code.  If you're building  .php pages, use PHP scripts.  If your building .htm or .html pages, JavaScript might be a better choice.
    Sadly, my Twitter account is not exactly a hot bed of activity.  I'll try to make an effort to post some things of interest once in a while.  :-)
    Cheers,
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Need to hide an Item at page load

    Hi,
    Can anyone help me to hide an item when the page is loaded. I want to display the Item when i click the GO button.
    Thanks in Advance.
    Edited by: [email protected] on Apr 15, 2009 10:25 PM

    Hi Pratap,
    processRequest is working correctly.
    In processFormRequest
    oambean.setRendered(true); is not working.
    In the page i get developer mode exception Error.
    Error - (This developer mode error is thrown instead of being registered due to the lack of the page context object.) The OA passivation framework coding standard has been violated. Web bean properties cannot be modified in the controller processFormData or processFormRequest method. Web bean properties should be modified in the processRequest method only. An attempt to modify a web bean has been made in the following call stack: java.lang.Throwable at oracle.apps.fnd.framework.OACommonUtils.getCallStack(OACommonUtils.java:785) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.setAttributeValue(OAWebBeanHelper.java:1707) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.setAttributeValue(OAWebBeanHelper.java:1725) at oracle.apps.fnd.framework.webui.OAWebBeanFormElementHelper.setAttributeValue(OAWebBeanFormElementHelper.java:1983) at oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean.setAttributeValue(OAMessageTextInputBean.java:287) at oracle.cabo.ui.BaseMutableUINode.setRendered(Unknown Source) at oracle.cabo.ui.beans.BaseWebBean.setRendered(Unknown Source) at oracle.apps.ak.search.webui.SearchCO.processFormRequest(SearchCO.java:54) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:734) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:943) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1546) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:929) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:895) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:751) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:373) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:929) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:895) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:751) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:340) at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2392) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1512) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384) at OA.jspService(OA.jsp:40) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803) at java.lang.Thread.run(Thread.java:534)

  • Need to update content on web page in real time...

    Hi all,
    I am using jsp with struts to display some information in a web page.
    Let's imagine i am displaying a list of stocks and its price in a web page. I want to upload the price of the stock as they are changing. I like to do it in a smart way: it is... i don't like to refresh the whole page every x seconds, i just like to change the value of the field that changed in the server in real time.
    Which are your suggestions? My coworked told me to hava a look in Ajax... What do you think about it?
    Thanks,
    Dani.

    Well first thing which i wanna emphasise on AJAX is not the replacement of this it still uses similar logic refreshing of X secs.
    Rather instead of refreshing the whole page one would only refresh a view.
    If you are using looking at a solution to achieve via struts here is where you should go in read it and look for a solution.
    http://today.java.net/pub/a/today/2005/10/27/sprinkle-ajax-magic-into-struts-webapp.html
    http://wiki.apache.org/struts/AjaxStruts
    http://www.omnytex.com/articles/xhrstruts/
    Hope this might help :)
    REGARDS,
    RaHuL

  • I need to update my old iPod touch. How can i do that?

    my ipod haven't been updated for a long time around 8 month and now i can't download anuthing from the store because it does not have the latest version ios 3 something. can somedoby help me??? please!!! i need to knoe tho steps to fallow to update it!!! the version it correntlu has i chack it out in general setteing> about and it says it is 4.2.1 (8C148)

    You most likely have a 2nd generation iPod which is not capable of being updated beyond 4.2.1

  • Have a mac more than 5 years old need to update software but i dont know how? what update do i need? any help appreciated.

    im trying to update the softare on my mac book, initially itunes but it wont update due to the software being behind. since my mac book is more than 5 years old i cant get the support from the apple website. so some knowledge from the community would be great. ill try and help what i can but not very computer literate

    You need to buy and install a Mac OS X 10.6 DVD, and then run Software Update; 10.6.8 is sufficient to run the latest version of iTunes.
    (76780)

Maybe you are looking for

  • Logic taking eternity to re-index loops!

    Hi, I just moved some files from my system HD to an external drive to save space. When I dropped them to the Loop Browser to reindexing on this new location it take several hours to do that. Like the whole night! The Progress bar don't show the curre

  • Update to 1.1.3 - but Folio Builder doesn´t work!

    Hi, we read every post about the current problem with the different versions of the folio builder. We have a new PC with Windows 7 and CS5 (no Prerelease Tools installed). I have installed and removed every version of dps and folio tools. On my Mac B

  • Issue with JPEG Exports

    I am unable to use my exported JPEG files in other programs. I have exported my InDesign document pages as JPEGs, and they are available in a folder and open up in Preview. However, when I try to import the saved JPEGs into other programs like powerp

  • Running oracle report in web

    Currently i am using oracle 9i,after building the report,I would like to run the report in web for testing purpose.How can i do it,is it i need to install oracle 9i application server?

  • CS4 64-bit stopped working completely

    I have a new computer with wondows 7 and when I installed CS4 it worked perfect in the beginning but after a few weeks PS CS4 64-bit stopped and I could only open the "normal" version. If I try to open the 64-bit it says: "Adobe photoshop cs4 does no