Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Aug 2002
    Location
    Adelaide, South Australia, Australia
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Capture ODBC error in Forms (Acc2000)

    I have an access 2000 front-end with an ORACLE 8.1.7 backend database. Tables are linked using the MS ORACLE ODBC Driver.

    I find that when I enter a new record, in the datasheet, with a duplicate primary key that I get an ODBC error returned. [ORACLE][ODBC][ORA]ORA-00001: unique constraint(FUEL.xyz) violated.

    When I do this duplicate data entry usiing a form the error I get back is Err.number = 3146. Which is all well and good but not much use in the case of an insert/update/delete not being executed correctly. As the reasons for a insert/update/delete not being committed could be due to a number of different factors, such as insufficient priveldges, incorrect values, violation of foreign keys, etc.

    Does anyone know of a way to retrieve the ORACLE error and not the interpreted JET error message when updating data by way of a form and/or code.

    Cheers
    Peter

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Capture ODBC error in Forms (Acc2000)

    Check out this knowledge base article - Q206175. The process is pretty messy, but it does give you some insights as to what is going on. We have the same issue with SQL Server ODBC connections, and decided it wasn't worth the bother, but you may want to pursue it.
    Wendell

  3. #3
    New Lounger
    Join Date
    Aug 2002
    Location
    Adelaide, South Australia, Australia
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Capture ODBC error in Forms (Acc2000)

    Wendell

    Thanks for the tip. I have tried to get the code from the knowledge base article but to no avail.

    I get an error on the line
    SRO_form.RecordsetClone.AddNew
    Error 3426. This action was cancelled by an associated object.

    Which is a bit wierd. I have tested the recordsetclone object and it is neither eof or bof. I have tried to do a cancelUpdate on the Recordset object, but as i suspected iit was not in update or inser mode.

    I think I might just giive it a miss.

    Thanks for your help
    Peter Thiele

Posting Permissions

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