Database Update not updating

Results 1 to 2 of 2

Thread: Database Update not updating

  1. #1
    Join Date
    Dec 1969

    Default Database Update not updating

    I am trying to update an Access 2000 database with information coming from a form. The script runs fine, I get no errors but the database does not update. I know the script can see the database because if I try to change the pathname by removing a letter or something, I get an error on it. As far as I can tell, the database is not set to read only. Any other ideas?? I&#039;ve included the code for reference.<BR><BR>Bob<BR><BR>&#060;%<BR>&#039;Decl are the variables<BR>Dim objConn, objRS<BR><BR>&#039;Create a connection to the database<BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR>objConn .Open "driver={Microsoft Access Driver (*.mdb)};" & _<BR> "dbq=" & Server.MapPath("Database/company_bio.mdb")<BR>SQL = "Select * FROM company_bio;"<BR><BR>&#039;Create the recordset object<BR>set RS = Server.CreateObject("ADODB.Recordset")<BR>RS.Open SQL, objConn, 2, 2<BR><BR>&#039;Add the new record<BR>rs.AddNew<BR>rs("company_name") = request("txtCompanyName")<BR>rs("address1") = request("txtAddress1")<BR>rs("address2") = request("txtAddress2")<BR>rs("city") = request("txtCity")<BR>rs("state") = request("txtState")<BR>rs("zip") = request("txtZip")<BR>rs("domain") = request("txtDomain")<BR>rs("contact_name") = request("txtContactName")<BR>rs("contact_title") = request("txtContactTitle")<BR>rs("contact_phone") = request("txtContactPhone")<BR>rs("contact_fax") = request("txtContactFax")<BR>rs("contact_email") = request("txtContactEmail")<BR>rs("product") = request("memoProduct")<BR>rs("description") = request("memoDescription")<BR>rs("usp") = request("memoUSP")<BR>rs("num_emp") = request("txtNumEmps")<BR>rs("num_years") = request("txtNumYears")<BR><BR>rs.Update<BR>rs.Clos e<BR>objConn.Close<BR>%&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: Database Update not updating

    sounds to me like a permissions problem. do you have the ability to "write" to the directory that the DB is located? <BR><BR>If that works, we are having the same problem further down the forum:<BR><BR><BR>--kyle

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts