Update Error

Results 1 to 2 of 2

Thread: Update Error

  1. #1
    Join Date
    Dec 1969

    Default Update Error

    Hi all,<BR> <BR>I am getting the following error:<BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80004005&#039; <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only. <BR><BR>/GetDomain.asp, line 38 <BR><BR>When I try to run the following:<BR><BR>&#060;!--#include file="email_validation.asp"--&#062;<BR>&#060;%<BR><BR>server.scripttimeout = 360<BR><BR><BR>Response.write("Let&#039;s Goo....20!" & "<BR>")<BR><BR><BR>Dim DataConnection, RecordSet<BR>Set DataConnection = Server.CreateObject("ADODB.Connection")<BR> DataConnection.ConnectionString="DSN=Email"<BR> DataConnection.Open<BR><BR>Set RS = Server.CreateObject("ADODB.Recordset")<BR>SQL = "Select Distinct Email.OrganisationCode, Email.EmailType, Domain, Email from Ref, Email where Ref.OrganisationCode = Email.OrganisationCode and Email.EmailType is not null"<BR>RS.open SQL, DataConnection, 3, 3<BR><BR><BR>Do until rs.eof<BR><BR> EmailAddress = rs("Email")<BR> <BR> if ChkEmail(EmailAddress) = 0 then<BR><BR> StrLen = Len(EmailAddress)<BR> StrPosition = instr(EmailAddress,"@")<BR> DomainLen = StrLen - StrPosition<BR> Domain = Right(EmailAddress, DomainLen)<BR><BR> RS("Domain") = Domain<BR> &#039;RS.Update<BR> <BR> end if<BR><BR><BR>RS.MoveNext &#039; this is line 38<BR>Loop<BR>Response.Write("Finished")<BR><BR>%& #062;<BR><BR>Does anyone know what is wrong with my code? If so, can it be fixed. <BR><BR>Cheers,<BR><BR>Ross<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Update Error

    This is a permissions problem with the database. Make sure that the folder containing the database is not readonly, and that write access is allowed for the folder. Also, ensure the same for the database itself<BR><BR>mj

Posting Permissions

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