Another easy thing, but i'm stumped too!

Results 1 to 5 of 5

Thread: Another easy thing, but i'm stumped too!

  1. #1
    Join Date
    Dec 1969

    Default Another easy thing, but i'm stumped too!

    How can I intercept these two errors I get from my mailing list:<BR><BR>1) error &#039;80040e2f&#039;(trying to add an entry that already exists)<BR>2) error &#039;800a0bcd&#039;(trying to unsubscribe an entry that doesn&#039;t exist)<BR><BR>I&#039;m using VBscript ASP. I&#039;d ideally like the user to be taken to a HTML page on error with a different page for each error, i know i&#039;ve seen this somewhere before but i can&#039;t for the life of me find it! Thanks in advance,<BR>Alan

  2. #2
    NPKumar Guest

    Default RE: Another easy thing, but i'm stumped too!

    Have a look at this link:<BR>

  3. #3
    Alan Newton Guest

    Default No, what I mean is...

    ...I need to redirect on ODBC errors, not exchange errors...if someone wants to add an email address to my db for my mailing list, they submit a form - the form checks against the db for any duplicated, and if there are any, won&#039;t let it be submitted. This returns an asp error of the following:<BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e2f&#039; <BR><BR>[Microsoft][ODBC Microsoft Access Driver] The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again. <BR><BR>/maillisttest/AddUser.asp, line 15 <BR><BR>I&#039;d like this to be redirected to a html page instead...any ideas?<BR><BR>

  4. #4
    Eddie Campbell Guest

    Default RE: No, what I mean is...

    See answer above (On Error...)

  5. #5
    Alex T. Guest

    Default RE: No, what I mean is...

    See if this will work to delete the Email Address:<BR><BR>Well, I had this code to verify a Username was in the DB. You could adjust to see if an email address is in the DB as well.<BR><BR>Dim oCONv, oRSu<BR> Set oCONv = Server.CreateObject("ADODB.Connection")<BR> DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "<BR> DSNtemp=dsntemp & "DBQ=F:usersmewwwdatabasesmyDBs.mdb" <BR> oCONv.Open DSNtemp<BR><BR><BR> Set oRSu = oCONv.Execute("DELETE EmailAddress FROM tblUserInfo WHERE EmailAddress = &#039;" & Request.Form("EmailAddress") & "&#039;")<BR><BR> if not oRSu.EOF then<BR> <BR> Response.Write "Email Address Deleted" <BR> else<BR> Respons.Write "Email Address Not Found"<BR> end if

Posting Permissions

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