Hi
I've problem with synchronization PocketPC->PC via mobilink& activesync
I've two versions of synchronization's scripts - "Inventur_settings" and "Inventur". First, it's version "Inventur_settings" - I upload only one table, with settings, my script compares values from iPaq and PC, saves results and download back to PocketPC (iPaq). Next, my application on iPaq (in embeddedVC++ 3.0) decide what should to do - download data from PC or upload to PC.
When I download, I can change datas on iPaq, next click button Synchro and datas should be update'd on PC. But... if I update

tables on iPaq short of synchronization, everything is ok. if I update tables on iPaq before - wrong.
Code:
	CMainFrame * p_mfrm = (CMainFrame*)AfxGetMainWnd();
	ULDB* db = &p_mfrm->m_uldb;
	long retcode;
	long l_error;
// ....
	db->UpdateInventur_settings();
// first synchronization, download from pc-ipaq
	l_error=p_mfrm->SynchronizeSettings();
	if (l_error!=0)
	{
		_itoa(l_error,_my,10);
		_text=_my;
		_text="Synchronization settings not completed. Error code: "+_text;
		MessageBox(_text,NULL,MB_OK);
		return;
	}
// reads table with settings
	db->OpenInventur_settingsCursor();
	db->GetNextInventur_settingsRecord(&m_rInventur);
	db->CloseInventur_settingsCursor();	
//reaction
	switch (m_rInventur.set_status) 
	{
		case 0:
			l_error=p_mfrm->Synchronize();
// ....
			break;
		case 1:
			UpdateData(true);					
// !!!!!!!!!!!!!!!!!!!!!!!!!
// now is ok. but if I move below two lines to other methods, and the sequence will be
// 1) button save (with update table)
// 2) button synchro (synchronization)
// then update on iPaq is ok, during synchronization " Warning: [10040] 1 row(s) were ignored in updating table"
			m_db->UpdateOr_inventory(m_nummer.GetBuffer(20),m_mbestand,m_sbestand,m_ibestand,m_bvorsch);
			m_db->UpdateOr_articles(m_nummer.GetBuffer(20),m_bez1.GetBuffer(400));
// !!!!!!!!!!!!!!!!!!!!!!!!!
//2nd synchronization, upload ipaq-pc
			l_error=p_mfrm->Synchronize();
			if (l_error=1)
				MessageBox(status1,NULL,MB_OK);
			else
				MessageBox(error_up,NULL,MB_OK);
			break;
		default:
			MessageBox(status,NULL,MB_OK);
	}
what's wrong??