Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Updating A Database


Message #1 by "sean dillon" <sdillon@b...> on Fri, 22 Mar 2002 10:14:28
Im workin on a project in which customer information is displayed in a 
table and the user is able to navigate between customers. When u have 
found the correct customer you are able to enter comments in text boxes 
underneath the customer info. The customer info is displayed using a 
recordset. My problem is when i enter in the comments into the text boxes 
and press the submit button it wont update the database with these 
comments.

Heres the code for setting up the text boxes for the comments:
<table>
    <tr bgcolor="#999999"> 
      <td width="14%" height="64">Date Received 
        <input type="text" name="txtDate"">
      </td>
      <td width="13%" height="64">Assigned To 
        <input type="text" name="txtAssig">
      </td>
      <td width="17%" height="64">Completed Date 
        <input type="text" name="txtCDate">
      </td>
      <td width="11%" height="64">Manager Sign Off 
        <input type="text" name="txtManager">
      </td>
      <td width="14%" height="64"> 
        <p>Closed </p>
        <p>Yes/No </p>
        <p> 
          <input type="checkbox" name="chkClosed" value="checkbox">
        </p>
      </td>
      <td width="12%" height="64">Reply to Customer 
        <input type="text" name="txtReply">
      </td>
      <td width="17%" height="64">Further Action Required 
        <input type="text" name="txtFurtherAction">
      </td>
      <td width="1%" height="64"><font color="#999999"></font></td>
      <td width="1%" height="64">&nbsp;</td>
    </tr>
  </table>
 
 
Code for Submit button:
<p> 
    <input type="submit" value="Add new Customer" name="cmdInsert">
  </p>


Code for Updating Record: set variables:
If (CStr(Request("MM_update")) <> "" And CStr(Request("MM_recordId")) 
<> "") Then

  MM_editConnection = MM_connData_STRING
  MM_editTable = "QuerySheet"
  MM_editColumn = "SheetNo"
  MM_recordId = "" + Request.Form("MM_recordId") + ""
  MM_editRedirectUrl = "fbpage.asp"
  MM_fieldsStr  
= "txtAction|value|chkStatus|value|txtDate|value|txtAssig|value|txtCDate|va
lue|txtManager|value|chkClosed|value|txtReply|value|txtFurtherAction|value"
  MM_columnsStr 
= "ActionRequired|',none,''|Status|none,1,0|DateReceived|',none,''|Assigned
To|',none,''|CompletedDate|',none,''|ManagerSignOff|',none,''|ClosedYes/No|
none,1,0|ReplytoCustomer|',none,''|FurtherActionRequired|',none,''"

Can anyone please help me

  Return to Index