Have found no info in UltraLiteJ API Reference with this one. When Attempting to sync, after setting the parameters, I get the following exception: "Error -1224: Synchronization profile '<null>' has invalid parameter 'host'." This is what I have set the AdditionalParms to: "SendColumnNames=false;SendDownloadACK=true;host=cdodevapp02.cdotech.local;port=8060;buffer_size=16000;timeout=240;persistent=on;version=1.1" I see no other field in SyncParms that would get the "host". The one that seemed most logical "StreamParms" is a read-only property. So I'm stumped. asked 07 Jul '17, 13:52 BESpring |
Both StreamHTTPParms and StreamHTTPSParms have methods setHost() and setPort(). Here is an example: SyncParms syncParms = myConnection.createSyncParms( SyncParms.HTTPS_STREAM, "MyUniqueMLUserID", "MyMLScriptVersion" ); StreamHTTPSParms httpsParms = (StreamHTTPSParms) syncParms.getStreamParms(); httpsParms.setHost("MyMLHost"); httpsParms.setPort(1234); answered 07 Jul '17, 14:25 Chris Keating I think your sample is for pre 17 version of Ultralink 17. There are almost no classes. Only interfaces. Here is my code... SyncParms syncParams = dbConn.CreateSyncParms(syncStream, syncInfo.ScriptVersion, syncInfo.UserName); switch (syncStream) { case (SyncParms.HttpStream): IStreamHTTPParms httpParams = syncParams.StreamParms as IStreamHTTPParms; At this point httpParams is NULL. syncParams.StreamParms says its http, a 1.
(07 Jul '17, 15:47)
BESpring
The code sample I posted came from the SQL Anywhere UltraLiteJ API document for v17. UltraLiteJ API is based on JDBC with some differences. These methods have existed since the first release of UltraLiteJ. See dcx.sap.com for the UltraLiteJ documentation.
(07 Jul '17, 16:06)
Chris Keating
This is the same issue as the "getLastError" thread.
(07 Jul '17, 16:14)
BESpring
|
This is for UltraLiteJ 17.