我在局域網內建了個WEB SERVICE,SQL SERVER數據庫與其在同一臺機器上,在WINCE 裏用SQLITE數據庫, 經過WEBSERVICE將sql server裏的相關信息下傳至SQLITE中,在對wince 的SQLITE進行相關修改後,要經過什麼方式再上傳到WEBSERVICE 的SQL SERVER裏,請給個建議,謝謝!我用的是VS2008!web
webservice 端 代碼:
public void strLD(string _billid,string _hname,string _wcode,string num)
{
string FeeWare = "FeeWare_" +Year();
//string FeeWare = "FeeWare_2013";
int order = FeeOrder(_billid);
string date =accountD();//取本地的相關值
string billid =_billid;//由客戶端的參數傳過來的帳單序號
int feeorder = order + 1;
string housename = _hname;//由客戶端的參數傳過來的房間名稱
string warecode =_wcode ;
double salenum =Convert.ToDouble(num);
string SQLstr = " insert into " + FeeWare + "(feeorder,accountdate,accountbillid,warecode,warename,wareclass,salenum,saleprice,salemoney,feemode,unit,parentcode,parentname,feewarestate,discountrate,accountstate,discountmoney,printnums,rootcode,rootname,ifbillx) select " + feeorder + " ,'" + date + "'," + _billid + ",warecode,warename,wareclass," + salenum + ",saleprice," + salenum + "*saleprice,0,unit,parentcode,parentname,'PDA點單',1,1,0,0,rootcode,rootname,0 from wares where warecode=" + warecode + "";
Db.getObjectExeNonQuery(SQLstr);
}
public static int FeeOrder(string billid)
{
string FeeWare = "feeware_" + Year();
string SQLstr = "select top 1 feeorder from " + FeeWare + " where accountbillid=" + billid + " order by feeorder desc";
int order = Db.getExecuteScalar(SQLstr);
//
if (order == -1)
{
return order = 0;
}
else
{
return order;
}
}
public static string Year()
{
string y = accountD().Substring(0, 4);
return y;
}
public static string accountD()
{
string SQLstr = "select accountdate from account_para where ifendaccount='false'and ifaccountdate='true'";
string d =Convert.ToString( Db.objExecuteScalar(SQLstr));
return d;
} sql