Squlite and I have two constraints, UNIQUE and CHECK RANGE.
Is there any way to get an error number for the specific error when using try/except/end.
All I get is "SQL Error: Constraint failed" and I'd like to let the user know specifically, what just went wrong.
Any way to seperate constraint errors
Any way to seperate constraint errors
Thanks
Dyslexic Bob
Dyslexic Bob
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Any way to seperate constraint errors
Hello Bob - I am not sure. Maybe you should look into the code, how SQLite returns errors. If SQLite gives some kind of an error number you could easily create a kinda SQLiteException that could have an additional property for that error number.
Re: Any way to seperate constraint errors
Thanks, thought I would ask here first, but decided to handle the issue myself before Post. More coding, but more control. I guess I was being lazy.
Thanks
Dyslexic Bob
Dyslexic Bob