on 06-10-2008 11:32 AM
Hi experts,
I have a problem, i want obtain the SYNC_KEY from DB, but if i do the SELECT SYNC_KEY FROM table the SYNC_KEY appear: "001E4F1D754C1DDD8CC9420C1C8E587E", it has char, and should be only number.
How can convert it?
Thanks in advance,
Hi,
SYNC_KEY always refers to CHAR32 data element. So, SYNC_KEY may contain characters also. Could you tell me why you need conversion to number.
Regards,
Siva.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If i do a select appear "001E4F1D754C1DDD8CC9420C1C8E587E".
If i obtain the sync_key with the method in MI: tableViewBean.getTableContent(row, 0); appear only number.
If i want modify a row:
public void modifyRowInDB(
String syBName,
String syncKey,
String newValue,
int col)
throws SmartSyncException, PersistenceException {
String syncBoName = syBName;
// Set default Syncboname for this example in case value is null.
//** SyncBo syncBo = getSyncBoInstance(syncBoName, syncKey);
SmartSyncTransactionManager transactionManager;
// A transaction manager is valid for one action starting with beginTransaction and ending with commit/rollback
// In this example we commit (save) every modification - no rollback.
transactionManager = dataFacade.getSmartSyncTransactionManager();
transactionManager.beginTransaction();
//** setHeaderFieldValue(syncBo, arrayHeaderFieldNames[col], newValue);
//Commit the transaction
transactionManager.commit();
}
and i send the value: "001E4F1D754C1DDD8CC9420C1C8E587E", it doesn´t understand this sync_key.
Regards,
Edited by: Victor Capi on Jun 10, 2008 12:51 PM
Hi Victor,
you do not modify a row while setting the SyncKey. You select an existing row - use the sync key as select criteria and then leave this value untouched while changing other values in that item....
So first run a select with the key - then you have the row you want to change. Then change this row - and persist it. That is the weay you should do it.
Hope it helps.
Regards,
Oliver
Yes - that is correct - and you can not change the sync key and you can not create an item with a sync key - nor have an empty item and set the sync key manually. this will not do what you expect!
So you know you want to change the item with sync key "abcde" - so you select the item from the Max DB with SyncKey "abcde". This item you have now - so you change the value of the property name in this item - for example - and save it again.
I do not really get your problem here.
Regards,
Oliver
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.