cancel
Showing results for 
Search instead for 
Did you mean: 

I canu00B4t modifyRowInDB, but not appear error...

Former Member
0 Kudos

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,

Accepted Solutions (1)

Accepted Solutions (1)

gopal_jee
Explorer
0 Kudos

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.

Former Member
0 Kudos

but are there any solution? I never do the modify, so... i don´t know if i have do something wrong...

Former Member
0 Kudos

The row is change in the device, but not in the backend...

Former Member
0 Kudos

Hi Victor,

well, your problem seems to be the Modify handler - so in your case the select statements. Probably you only send the information what you want to change, but not what item you are talking about.

Regards,

Oliver

Answers (0)