1. Alex Lindsay
  2. Valentina Database ADK
  3. Воскресенье, Май 17 2020, 02:59 PM
  4.  Подписаться через email
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?
There are no comments made yet.
François Van Lerberghe Ответ принят
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.
There are no comments made yet.
Alex Lindsay Ответ принят
Ok, This is for Xojo ADK for Mac OS.
There are no comments made yet.
  • Страница :
  • 1

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