Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8563953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:05:18+00:00 2026-06-11T17:05:18+00:00

I need to retrieve product info. from database and now want to edit some

  • 0

I need to retrieve product info. from database and now want to edit some data and save it back to database. I’ve created Edit Form page and passed value to the other Save page. What I want is only to save record that had been edited however when i clicked “save” button, data of all records were passed through. What i confused was with the same passing method, I can successfully delete only specific record.

Here’s my code..

<table cellpadding="0" cellspacing="0" border="1" width="100%">
    <tr class="border bluebackend" >
        <td class="center bold" width="30">Size</td>
        <td class="center bold" width="30">Color</td>
        <td class="center bold" width="27%">Est. Qty (dz.)</td>
        <td class="center bold" width="30">&nbsp;</td>
        <td class="center bold" width="30">&nbsp;</td>
    </tr>
<%
dim total_qty_est, total_qty
if rsPdtn_sizeColor.eof then 
response.Write "<tr><td colspan=""3"">file not found</td></tr>"
Else                      
Do while Not rsPdtn_sizeColor.EOF

total_qty_est = rsPdtn_sizeColor.fields.item("pdtn_st_qty_est")
total_qty = total_qty + total_qty_est       

%>                                              
    <tr >
        <td class="center">
            <select name="pdtn_st_size">
                <option selected>-- size -- </option>
                <option value="L" <%=checkSelectedScript(rsPdtn_sizeColor.fields.item("pdtn_st_size"),"L")%>>L</option>
                <option value="XL" <%=checkSelectedScript(rsPdtn_sizeColor.fields.item("pdtn_st_size"),"XL")%>>XL</option>

            </select>                                                                    
        </td>
        <td class="center">
            <select name="pdtn_st_color">
                <option selected>-- color -- </option>
                <option value="Orange" <%=checkSelectedScript(rsPdtn_sizeColor.fields.item("pdtn_st_color"),"Orange")%>>Orange</option>
                <option value="Pink" <%=checkSelectedScript(rsPdtn_sizeColor.fields.item("pdtn_st_color"),"Pink")%>>Pink</option> 
            </select>                                                                         
        </td>
         <td class="center">
            <input type="text" value="<%=PcsToDz(rsPdtn_sizeColor.fields.item("pdtn_st_qty_est"))%>" name="pdtn_st_qty_est" size="3">
            &nbsp;&nbsp;(<%=rsPdtn_sizeColor.fields.item("pdtn_st_qty_est")%>)
         </td>
        <td><input type="button" name="" value="Del" onClick="confirmationDeletePrice('../engine/delPdtn_szCl.asp?pdtn_szcl_id= <%=rsPdtn_sizeColor.fields.item("pdtn_szcl_id")%>&pdtn_st_id=<%=rsPdtn_sizeColor.fields.item("tbl_pdtn_sizecolor.pdtn_st_id")%>')"></td>     
        <td class="center" >
        <input type="button" name="" value="Save" onClick="confirmationSaveProduction_Szcl('production_szcl_edit_action.asp?pdtn_szcl_id= <%=rsPdtn_sizeColor.fields.item("pdtn_szcl_id")%>')">

         <input type="hidden" value="Y" name="edit_pdtn_szcl">
          <input type="hidden" value="<%=rsPdtn_sizeColor.fields.item("pdtn_szcl_id")%>" name="pdtn_szcl_id">                                                                    
        </td>                                                               
    </tr>
<%
rsPdtn_sizeColor.movenext

Loop    
rsPdtn_sizeColor.movefirst
end if
%>       

and this is my Save page code…

<%
    pdtn_st_id = Request.form("pdtn_st_id")
    pdtn_st_qty_est_dz = Request.form("pdtn_st_qty_est")

        if pdtn_st_qty_est_dz <> "" then
            pdtn_st_qty_est = DztoPcs(pdtn_st_qty_est_dz)
        end if

    pdtn_st_size =   Request.form("pdtn_st_size")   
    pdtn_st_color =   Request.form("pdtn_st_color") 
    edit_pdtn_szcl =   Request.form("edit_pdtn_szcl")   

    call checkBlank(pdtn_st_qty_est)

    if SomethingError <> "yes" then

        Call DBConnOpen()

            Set Rs = Server.CreateObject("ADODB.Recordset")
            Set Rs.ActiveConnection = Conn

            strSQL = "SELECT * FROM tbl_pdtn_sizecolor"
                pdtn_szcl_id = Request.form("pdtn_szcl_id")
                strSQL = strSQL & " WHERE pdtn_szcl_id =" & pdtn_szcl_id & ""
                Rs.Open strSQL, Conn, 1, 3          

            Rs.Fields("pdtn_st_id") = pdtn_st_id
            Rs.Fields("pdtn_st_qty_est") = pdtn_st_qty_est
            Rs.Fields("pdtn_st_size") = pdtn_st_size    
            Rs.Fields("pdtn_st_color") = pdtn_st_color  

            Rs.Update
            Rs.Close

            response.redirect "production_view.asp?pdtn_st_id=" & pdtn_st_id

        Call DBConnClose()

    else
        call writeInputError
    end if
%>      
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:05:19+00:00Added an answer on June 11, 2026 at 5:05 pm

    The simplest solution is to move your existing tags to around the table row in the loop. That way you will be able to edit one row at a time without modifying your save page code.

    I have added the form tags to your code below, but you would need to use the FORM tag you are already using:

    <table cellpadding="0" cellspacing="0" border="1" width="100%">
        <tr class="border bluebackend" >
            <td class="center bold" width="30">Size</td>
            <td class="center bold" width="30">Color</td>
            <td class="center bold" width="27%">Est. Qty (dz.)</td>
            <td class="center bold" width="30">&nbsp;</td>
            <td class="center bold" width="30">&nbsp;</td>
        </tr>
    <%
    dim total_qty_est, total_qty
    if rsPdtn_sizeColor.eof then 
    response.Write "<tr><td colspan=""3"">file not found</td></tr>"
    Else                      
    Do while Not rsPdtn_sizeColor.EOF
    
    total_qty_est = rsPdtn_sizeColor.fields.item("pdtn_st_qty_est")
    total_qty = total_qty + total_qty_est       
    
    %>
        <form action="" method=""><!--move your form open tag here-->                                       
        <tr >
            <td class="center">
                <select name="pdtn_st_size">
                    <option selected>-- size -- </option>
                    <option value="L" <%=checkSelectedScript(rsPdtn_sizeColor.fields.item("pdtn_st_size"),"L")%>>L</option>
                    <option value="XL" <%=checkSelectedScript(rsPdtn_sizeColor.fields.item("pdtn_st_size"),"XL")%>>XL</option>
    
                </select>                                                                    
            </td>
            <td class="center">
                <select name="pdtn_st_color">
                    <option selected>-- color -- </option>
                    <option value="Orange" <%=checkSelectedScript(rsPdtn_sizeColor.fields.item("pdtn_st_color"),"Orange")%>>Orange</option>
                    <option value="Pink" <%=checkSelectedScript(rsPdtn_sizeColor.fields.item("pdtn_st_color"),"Pink")%>>Pink</option> 
                </select>                                                                         
            </td>
             <td class="center">
                <input type="text" value="<%=PcsToDz(rsPdtn_sizeColor.fields.item("pdtn_st_qty_est"))%>" name="pdtn_st_qty_est" size="3">
                &nbsp;&nbsp;(<%=rsPdtn_sizeColor.fields.item("pdtn_st_qty_est")%>)
             </td>
            <td><input type="button" name="" value="Del" onClick="confirmationDeletePrice('../engine/delPdtn_szCl.asp?pdtn_szcl_id= <%=rsPdtn_sizeColor.fields.item("pdtn_szcl_id")%>&pdtn_st_id=<%=rsPdtn_sizeColor.fields.item("tbl_pdtn_sizecolor.pdtn_st_id")%>')"></td>     
            <td class="center" >
            <input type="button" name="" value="Save" onClick="confirmationSaveProduction_Szcl('production_szcl_edit_action.asp?pdtn_szcl_id= <%=rsPdtn_sizeColor.fields.item("pdtn_szcl_id")%>')">
    
             <input type="hidden" value="Y" name="edit_pdtn_szcl">
              <input type="hidden" value="<%=rsPdtn_sizeColor.fields.item("pdtn_szcl_id")%>" name="pdtn_szcl_id">                                                                    
            </td>                                                               
        </tr>
        </form><!--move your form close tag here-->
    <%
    rsPdtn_sizeColor.movenext
    
    Loop    
    rsPdtn_sizeColor.movefirst
    end if
    %>       
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to retrieve random rows from SQL Server database. I am looking for
I need to retrieve data from one table and use it to retrieve data
I'm looking to save some data in the Magento database without hassling with creating
I need to retrieve a row from a different database. How can I retrieve
I have three tables that I need to retrieve info from: Products, ProductOptions, and
I need to retrieve from database list of manufacturers (table producenci), but only from
I need to know how to retrieve each product's custom options (name/value) in an
Hi I'm new to Oracle 10g. I need retrieve the all the sublist from
I need to retrieve a value from a website (can vary and I have
I need to retrieve information from two separate models which are similar but not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.