分为两种:
时时的:
SCHOOL_TYPEClient std = new SCHOOL_TYPEClient();
SCHOOL_TYPEInfo stdinfo = null;
SCHOOL_TYPE std_type = new SCHOOL_TYPE();int iResult = -1;
string sResult = null;
private void button1_Click(object sender, EventArgs e)
{

using (TransactionScope ts = new TransactionScope())
{
//1
stdinfo = new SCHOOL_TYPEInfo();
stdinfo.GRADE_NAME = "1";
iResult = std_type.Insert(stdinfo); //2
stdinfo = new SCHOOL_TYPEInfo();
stdinfo.GRADE_NAME = "2";
iResult = std.Insert(stdinfo); ts.Complete();
}
}
手动同步:条件CPU空闲时,固定的时间
但是手动同步的怎么写呢,一个本地数据库,一个外网的。本地的数据库那么多操作,要定时把本地的数据同步到外网上。怎么知道这两个库里的表有啥不一样啊。困惑,不知道怎么弄,帮个忙。不知道能听的懂我啥意思不