In the UWP project I use the following to get the list of UltraLite Publications... int pubCount = conn.GetDatabaseSchema().GetPublicationCount(); Windows.Foundation.Collections.IIterator<string> pubIterator = conn.GetDatabaseSchema().GetPublications(); How does one do this in the Android Project with UltraLiteJ? Is there a sample on how to use UltraLiteJ with Xamarin? There is for Android Studio and Eclipse, but I assume this is all Java. |
There is not an API method exposed by UltraLiteJ to list or iterate the publication list. You can determine the list of publications to be sync'd via the SyncParms object but that is not the same as the list of defined publications.
You can, however, query the SYSPUBLICATION system table i.e.
PreparedStatement ps; ps = con.prepareStatement( "select publication_name from syspublication"); ResultSet rs = ps.executeQuery(); while (rs) { currPub = rs.getString(1); }
This is untested code
I am not aware of an example Xamarin project using UltraLiteJ.
Querying the SYSPUBLICATION system table is how I thought about doing it. I saw some reference to doing it this way. Problem is that the Connection object does NOT have the prepareStatment() function. Intellesense does not show it. Could it be that I built the Binding Project of the .jar as EmbeddedReferenceJar. You see my preveious question. What arethe .so files?
Meant to add Thanks..
It is certainly available in UltraLiteJ API:
See http://dcx.sap.com/index.html#sqla17api/en/html/9ee6b543a7d31014953098596c506827.html
I cannot speak to why Xamarin is not handling the UltraLiteJ jar correctly. Have you raised this with Xamarin or its user community?
Problem was using "Connection" and not "IConnection". 'J' uses interfaces for the most part. Where as UWP version doesn't. Caught me by surprise. So I have encoded all and am having a build issue for which I will post a new question.