1. Alex Lindsay
  2. Valentina Database ADK
  3. 日, 5月 17 2020, 02:59 PM
  4.  メールで購読
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.