cancel
Showing results for 
Search instead for 
Did you mean: 

SyncParms.AdditionalParms setting value issue

Former Member
0 Kudos
1,736

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.

Former Member
0 Kudos

This is for UltraLiteJ 17.

Accepted Solutions (0)

Answers (1)

Answers (1)

chris_keating
Product and Topic Expert
Product and Topic Expert
0 Kudos

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);
Former Member
0 Kudos

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.

chris_keating
Product and Topic Expert
Product and Topic Expert
0 Kudos

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.

Former Member
0 Kudos

This is the same issue as the "getLastError" thread.