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

asked 17 Jan '12, 07:35

Alex's gravatar image

Alex
1.0k214554
accept rate: 25%

edited 17 Jan '12, 07:37


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.

permanent link

answered 17 Jan '12, 10:00

Andy%20Quick's gravatar image

Andy Quick
2.2k2737
accept rate: 45%

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

(17 Jan '12, 11:38) Alex
Replies hidden
2

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.

(17 Jan '12, 11:46) Tim McClements

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

(17 Jan '12, 13:01) Alex
Replies hidden
1

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.

(08 Feb '12, 13:14) Bill Frier

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

(13 Feb '12, 06:14) Alex
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×78
×68
×13

question asked: 17 Jan '12, 07:35

question was seen: 1,001 times

last updated: 13 Feb '12, 06:14