CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Oracle database

  1. #1
    Join Date
    Jul 1999
    Posts
    104

    Oracle database

    In Access I created a database with linked tables to Oracle through ODBC.
    When 2 users try to add a record, it's possible that a double key is created and Oracle gives an error message, but I can' t trap the error in VB.

    Does someone know how to trap this error?


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Oracle database

    unless your Oracle ODBC driver sucks, you should be able to inspect the DAO errors collection for any errors from the underlying database system.



  3. #3
    Join Date
    Jul 1999
    Posts
    104

    Re: Oracle database

    Where should I put my code then?
    I tried at afterupdate, beforupdate, lostfocus, beforinsert, afterinsert, ...

    (I should work with on error goto... , right ?)


  4. #4
    Join Date
    Nov 1999
    Posts
    5

    Re: Oracle database

    You are right. You should be able to use Err.Number. Find out the number returned by not handling the error, then use that number to verify if Err.Number returns the same. If it does, Re-commit to the database.
    Rajan


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured