Getting and Setting Personalization Key Values

The PersonalizationParameters class is generated automatically for managing personalization keys. When a personalization parameter value is changed, the call to save automatically propagates the change to the server.

An operation can have a parameter that is one of the Sybase Unwired Platform list types (such as IntList, StringList, or ObjectList). This code shows how to set a personalization key, and pass an array of values and an array of objects:

PersonalizationParameters pp = SUP101DB.GetPersonalizationParameters();
pp.MyIntPK = 10002;
pp.Save();
Sybase.Collections.IntList il = new Sybase.Collections.IntList();
il.Add(10001);
il.Add(10002);
pp.MyIntListPK = il;
pp.Save();
Sybase.Collections.GenericList<MyData> dl = new Sybase.Collections.GenericList<MyData>(); //MyData is a structure type defined in tooling
MyData md = new MyData();
md.IntMember = 123;
md.StringMember = "abc";
dl.Add(md);
pp.MyDataListPK = dl;
pp.Save();

If a synchronization parameter is personalized, you can overwrite the value of that parameter with the personalization value.

A personalization parameter cannot have a value of null. When you create a personalization parameter in Sybase Unwired WorkSpace that allows null as a valid value, and the default value is null, the parameter may be invalid. Ensure that you enter a valid value for the password, when you create the parameter, or by specifying a value in your application.