cancel
Showing results for 
Search instead for 
Did you mean: 

iPhone - Sybase RFC called multiple times

Former Member
0 Kudos

Hi,

I have an RFC that is adding some data in the system. This works, how ever it gets called multiple times with the same data. Every time a synchronization is done it adds a new row with all the same data. (even with 1 entry so it's not because of the loop).

This is how my save function looks, newEntriesMBO is an array with Synchronization parameters. Should I do anything more than [sync delete]?

for (TimeSheets_EnterTimeDataSynchronizationParameters *sync in newEntriesMBO)

{

[sync save];

while ([TimeSheets_TimeSheetsDB hasPendingOperations])

{

[NSThread sleepForTimeInterval:0.2];

}

[sync delete];

}

Edited by: PJ Deraedt on Sep 19, 2011 11:06 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi PJ,

Perhaps you can share some more details. Are you using subsequent MBO ? I logged a ticked with Sybase on this issue but haven't heard back. If I get any useful response, I 'll update forum.

Former Member
0 Kudos

Hi

Once the personalization parameters are set ,you should call [pp save];

the next step would be to check for pending operations

while (TimeSheets_TimeSheetsDB hasPendingOperations)

{

NSThread sleepForTimeInterval:0.2;

}'

Thats it no more code. sync delete etc is all not required. The reason why u get multiple calls is because pp save function is called multiple times.

Thanks

Pradeep

Former Member
0 Kudos

You could also refer to

Former Member
0 Kudos

Hi Pradeep,

Thanks for your reply, but the save function is only called once and still RFC gets multiple entries.

Former Member
0 Kudos

Hi

Are you calling sync methods after the while loop ?

Also please check the log at the server . There could be an error with the RFC .

Did the other link help ?

Thanks

Pradeep