Êý¾Ý10WÌõÒÔÉÏ,wm6.5ƽ̨,ÄÚ´æÓÐÏÞ
C# code:
private void connserver()
{
Cursor.Current = Cursors.WaitCursor;
try
{
DataSet ds = new DataSet();
SqlCeConnection conn = new SqlCeConnection(constr);
SqlCeCommand cmd = new SqlCeCommand("select vcbarcode,cdeptid,citemid,cbaseitemid,cname,cmeasure,cmodel,funitqty,fnowinprice,fsellprice from vco_items ", conn);
SqlCeDataAdapter clientda = new SqlCeDataAdapter();
SqlCeCommand insert = new SqlCeCommand("insert into vco_items(vcbarcode,cdeptid,citemid,cbaseitemid,cname,cmeasure,cmodel,funitqty,fnowinprice,fsellprice) select @vcbarcode,@cdeptid,@citemid,@cbaseitemid,@cname,@cmeasure,@cmodel,@funitqty,@fnowinprice,@fsellprice");
insert.Parameters.Add("@vcbarcode", SqlDbType.NVarChar, 30, "vcbarcode");
insert.Parameters.Add("@cdeptid", SqlDbType.NChar, 4, "cdeptid");
insert.Parameters.Add("@citemid", SqlDbType.NChar, 6, "citemid");
insert.Parameters.Add("@cbaseitemid", SqlDbType.NChar, 6, "cbaseitemid");
insert.Parameters.Add("@cname", SqlDbType.NVarChar, 50, "cnam