on 11-26-2007 10:04 AM
Hi, i have a problem... i´m doing a SmartSync Project, and i want modify a row with the method modifyRowInDB.
My steps are:
public void modificarIMP (String BO, String m, Vector lista) {
for (int i = 0; i < lista.size(); i++) {
try {
dbAccess.modifyRowInDB(BO,(String)lista.elementAt(i), m, 4);
} catch (SmartSyncException e) {
e.printStackTrace();
} catch (PersistenceException e) {
e.printStackTrace();
}
}
}
lista = Vector of SYNC_KEY
m = new value
4 = column for modified
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();
}
Not appear error, but not modify the row, what happend?
Thanks,
Hi Victor,
You are trying yo modify a row but the chages are not appearing. It may be due to conflict between client and backend. In case of conflict backend wins. So it may be a case of conflict in which your changes are not appearing.
Regards,
Gopal.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.