on 2012 Jan 17 7:35 AM
Hello guys,
I'm trying some Ultralite's funcionalities that is supposed
to throw warnings.
How could I "catch" these warnings on client, since I'm
using the UltraliteJ for Android?
Here a little code snippet about what I'm doing in my application:
ps = conn.prepareStatement("ALTER DATABASE SCHEMA FROM FILE '" + "'f.getAbsolutePath() + "'"); ps.execute();
I have to know if any warning was logged in the command's execution above.
Best Regards,
Alexander Rocha
Request clarification before answering.
Alex,
At this time there is no way to get warnings from the UltraLiteJ API. We recognize this as a deficiency, and plan to address it by adding an API to get the last SQL warning code in the Connection class.
Regarding the SQLE ROW DROPPED DURING SCHEMA UPGRADE warning that could be generated as a result of the ALTER DATABASE SCHEMA FROM FILE statement, the best workaround that I can offer at this time is to do pre-checks for multiple rows with the same value if you are adding a uniqueness constraint, before you do the schema upgrade.
Thank you for your feedback.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The iPhone library provides access to warnings, yes. You can either call the GetLastError function to retrieve all information following a call/request, or you can set a callback function which is called automatically whenever an error or warning is raised.
Hi Alex, Andy has addressed the deficiency around accessing warnings with UltraLiteJ for Android. See CR Number 697638 for details. At this point there is no estimate for when an EBF with this fix will be posted.
User | Count |
---|---|
87 | |
9 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.