Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

For UWP both the Connection and Database objects have a member function GetLastError(). Is there such a member function on any object in UltraLiteJ17? Haven't been able to find one. I see that IConnection has a LastWarning. Is this the equivalent?
Mr. Google and I have found the API ref for WinRT UltraLite but not one for UltraLiteJ 17 (can find older ones though).

asked 07 Jul '17, 10:04

BESpring's gravatar image

accept rate: 20%

When an error is encountered in UltraLiteJ, an exception will be thrown. To get the error code, check ULjException.getErrorCode().

permanent link

answered 07 Jul '17, 11:28

Chris%20Keating's gravatar image

Chris Keating
accept rate: 31%

In UltraLiteJ17 there is no getErrorCode() in ULjException.

(07 Jul '17, 13:21) BESpring

Perhaps a problem with Xamarin?

(07 Jul '17, 14:16) Chris Keating

That I don't know. Intellisense shows only 5 possibilities. Your example has getErrorCode(). I think this is from an older version of UltraliteJ. I see this kind of function in most API references but the "get...." or "set...." don't exist. Almost everything is an interface with properties.

(07 Jul '17, 15:50) BESpring

That method has existed from the original release of UltraLiteJ and will continue going forward. I would not trust the Xamarin generated wrapper based on the problems that you have run into thus far.

(07 Jul '17, 16:02) Chris Keating

You're going to have to bear with me as I'm an old .NET programmer and have only played around with Android Studio but without any 3rd party Libraries. This is my initial foray into Xamarin and VS2017. Everything works as advertised with the UWP project and UltraLite 17.
For the Android project I created a Binding Project which some of you helped me with. Its resultant is then inserted into the References for the Android project and I get all of these interfaces in lieu of classes. I have no explanation for this, I'm just following the info I find and get from others. So you think that Xamarin is putting a wrapper around UltraLiteJ and that is why I'm seeing what I'm seeing. There then must be one or more settings in the Binding Project or the Android project that must be changed. Any idea??

(07 Jul '17, 16:11) BESpring

I saw the documentation for UltraLiteJ and believe me I was confused but it was working up to this point. I am using VS2017 and I have not seen anyone anywhere using UltraLiteJ referencing 2017 but they reference VS2015. This is what I saw when researching the UWP program too.

(07 Jul '17, 16:34) BESpring

I may have used the wrong terminology - I assume that binding is Xamarin "wrapping" the source java classes so that it can be called within a Visual Studio. We have no experience with that product and any information I have posted to help have been derived by researching the internet. Currently, we support UltraLiteJ development in a JAVA IDE such as Android Studio. We have no experience with Xamarin.

Based on what you have described in various posts, it is appears that the binding is missing several methods that calls into question whether the binding is correct. For example, the missing ULjException.getErrorCode(),HTTPStreamParms.setHost(), and HTTPStreamParms.setPort() are all methods that are available in the UltraLiteJ API but not visible via Xamarin. I am further concerned with the SyncObserver "handle" that you reported separately since the UltraLiteJ code has not such object (let alone one that is not public).

My recommendation is that you work with Xamarin also to try and figure out why there are differences between the source UltraLiteJ API and the bindings generated. If Xamarin has questions or feedback related to UltraLiteJ, you may want to share that via a SAP support issue.

(07 Jul '17, 16:35) Chris Keating

I'm sure the Binding operation is the issue. I decompiled the JAR file with a Windows program called "Jave Decompiler" ( and saw that every class that ended up being an interface in my Android project is defined as an interface in the JAR. More exactly as a "public abstract interface". An example is PreparedStatement. Whereas SyncResult and SyncParms are defined as "public abstract class". So Xamarin is doing what it should be doing.

(10 Jul '17, 11:33) BESpring
More comments hidden
showing 5 of 8 show all flat view
Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 07 Jul '17, 10:04

question was seen: 1,604 times

last updated: 10 Jul '17, 11:33