1. Alex Lindsay
  2. Valentina Database ADK
  3. Sonntag, Mai 17 2020, 02:59 PM
  4.  Abonnieren via E-Mail
I have a question about VTable.AddRecord and VCursor.AddRecord methods.
How can I check if an error occurs?
1. Do these methods raise an exception if an error occurs?
2. Do these methods return an invalid RecId such as zero and not raise an exception?
3. Should I check VDabase.ErrNumber after the action.
4. In general, when does Valentina raise exceptions instead of specific return values?
5. Is there a good document on the design philosophy for the Valentina ADK that answers these types of questions that I should be referencing?
Kommentar
There are no comments made yet.
François Van Lerberghe Akzeptierte Antwort
Using VCursor.AddRecord In Xojo,
- if successful, Valentina return the RecID of the newly added record
- if something wrong happen, Valentina always raise a VException if Valentina.ThrowExceptions = True. Not sure DB.ErrNum is <> 0 if Valentina.ThrowExceptions = False (not tested). I suppose the result is = 0

About VException, I remember that using old version (tested on 5.8.8 with Realbasic 2011), there were a memory leak. I used instead Valentina.ThrowExceptions = False and raise myself a VException after if DB.ErrNum <> 0. Doing this that way doesn't leak memory on VException.
Kommentar
There are no comments made yet.
Alex Lindsay Akzeptierte Antwort
Ok, This is for Xojo ADK for Mac OS.
Kommentar
There are no comments made yet.
  • Seite :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories