System.Data.SQLite

Login
This project makes use of Eagle, provided by Mistachkin Systems.
Eagle: Secure Software Automation
Ticket Hash: 71bedaca19d94cb6b6c6c2f3deb293b71a2b3133
Title: Add enumeration for extended return codes
Status: Closed Type: Feature_Request
Severity: Minor Priority: Medium
Subsystem: Convert Resolution: Fixed
Last Modified: 2015-07-13 19:51:41
Version Found In: 1.0.98.0
User Comments:
anonymous added on 2015-06-02 07:37:38: (text/html)
<p>I think there should be an enum SQLiteExtendedResultCode mapping to those described <a href="https://www.sqlite.org/rescode.html#extrc">here</a>.</p> 
<p>It's rather cumbersome to be able to write<br />
<code>SQLiteErrorCode errorCode = myConnection.ExtendedResultCode();<br />
if (errorCode == SQLiteErrorCode.Constraint)<br />
    doSomething();</code><br />
but then having to write<br />
<code>if ((int)errorCode == 1555 /* SQLiteExtendedResultCode.ConstraintPrimaryKey */)<br />
    doSomething();</code></p>
<p>It would also be nice to have SQLiteException.ErrorCode being an SQLiteErrorCode instead of an int.</p>

anonymous added on 2015-07-13 11:33:19: (text/html)
Moreover: even after setting myConnection.SetExtendedResultCodes(true) I would have expected myConnection.ResultCode() to still deliver one of the 31 <b>Primary Result Codes</b> - why else should there be a method myConnection.ExtendedResultCode()? The documentation here is by the way erroneous because it says for all three methods "Enables or disable<u>d</u> extended result codes returned by SQLite". <br/>
Regards, Bernd

mistachkin added on 2015-07-13 19:51:41: (text/x-fossil-plain)
Fixed on trunk via check-in [42798551ca].  Instead of creating a new enumeration,
the existing one was updated to include the extended return codes.