1. Arcady Abramov
  2. Beta Testing
  3. Friday, 24 January 2020 07:29 AM UTC

Hello, team

What would be the correct way to migrate DBError event from PB classic to .NET?

Thank you

Michael Kramer Accepted Answer Pending Moderation
  1. Friday, 24 January 2020 16:34 PM UTC
  2. Beta Testing
  3. # 1

Exceptions with .NET DataStore:

  1. Open SnapDevelop
  2. On Start Page >
    Section DataWindow Converter & .NET DataStore >
    Select CRUD Operations with .NET DataStore
  3. On the new web page >
    Within content list on right side >
    Select Perform CRUD Operations Using the Web API
  4. Several code examples on this page
    1. Catch exception for Retrieve
    2. Catch Exception for Update
    3. etc.

HTH /Michael

Comment
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Friday, 24 January 2020 13:58 PM UTC
  2. Beta Testing
  3. # 2

Database errors are exposed as exceptions thrown. You don't have a centralized DBError event. Instead in code that builds up a transaction and COMMIT you will need to surround that code with TRY-CATCH.

Part of that exception handling should be perform ROLLBACK.

Comment
  1. Arcady Abramov
  2. Friday, 24 January 2020 16:26 PM UTC
I meant in the Datastore class
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.