cancel
Showing results for 
Search instead for 
Did you mean: 

Handling warnings with UltraliteJ

Former Member
2,836

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

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.

Former Member
0 Kudos

Thank you a lot for your reply. Do you know if this feature have been implemented for the Objective-C (Iphone) client?

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.

Former Member
0 Kudos

Thanks a lot Tim, that already solves my problem with the Iphone library. I hope this functionality is available for UltraliteJ soon 😃

Former Member

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.

Former Member
0 Kudos

Ok, Thank you very much Bill. I will wait for it, then. Please, keep in touch if you have any news about.

Answers (0)