Give me better solution as early as possible....
strquery = "UPDATE Item_Master SET Display_Name = '" + txtDisplay_Name.Text + "', Item_Category ='" + cmbCategory.Text + "', Item_SubCategory ='" + cmbSub_category.Text + "', Standard_UOM ='" + cmbStandard_UOM.Text + "' , Item_Description = '" + txtDescription.Text + "', Package = '" + cmbPackage.Text + "', Units_per_pack = " + txtUnits_Per_Pack.Text + ", Color ='" + txtcolor.Text + "', Size='" + txtsize.Text + "',Company='" + txtcompany.Text + "', Model_No='" + txtmodel_no.Text + "', Manufacturer_Lot_No='" + txtmfg_lot_no.Text + "', MRP=" + txtmrp.Text + ", Manufacturing_Date='" + mfg_dt.ToShortDateString() +", Expiry_Date = '" + exp_dt.ToShortDateString() + "', Unit_Cost=" + txtUnit_Cost.Text + ", Unit_Price=" + txtUnit_Price.Text + ", Item_Default_Location='" + cmbDefault_Location.Text + "', Default_Supplier='" + cmbDefault_Supplier.Text + "', Item_Re_Order_Level=" + txtitem_reorder_level.Text + ", Item_Min_Level=" + txtitem_min_level.Text + ", Item_Max_Level=" + txtitem_max_level.Text + ", Item_Status='" + cmbItem_Status.Text + "', Item_Remarks='" + txtitem_remark.Text + "' Where Item_Code='" + cmbItem_Code.Text + "'";
mycmd = new OleDbCommand(strquery, conn);
conn.Open();
mycmd.ExecuteNonQuery();
MessageBox.Show("Data Updated Successfully...","Item Update",MessageBoxButtons.OK);
conn.Close();
Loading
Marimuthu ArigovindasamyPosted Jun 20, 2010, 10:26 PM
strquery = "UPDATE Item_Master SET Display_Name = '" + "displayname" + "', Item_Category ='" + "category" + "', Item_SubCategory ='" + "subCategory" + "', Standard_UOM ='" + "uom" + "' , Item_Description = '" + "desc" + "', Package = '" + "package" + "', Units_per_pack = " + "units" + ", Color ='" + "coloir" + "', Size='" + "size" + "',Company='" + "company" + "', Model_No='" + "model" + "', Manufacturer_Lot_No='" + "mfg" + "', MRP=" + "mrp" + ", Manufacturing_Date='" + "mfgDate" + "' , Expiry_Date = '" + "expireydate" + "', Unit_Cost=" + "unitcost" + ", Unit_Price=" + "price" + ", Item_Default_Location='" + "default" + "', Default_Supplier='" + "supplier" + "', Item_Re_Order_Level=" + "reorder" + ", Item_Min_Level=" + "min" + ", Item_Max_Level=" + "max" + ", Item_Status='" + "status" + "', Item_Remarks='" + "remark" + "' Where Item_Code='" + "code" + "'";
theLizardPosted Jun 19, 2010, 7:44 PM
SreekanthPosted Jun 19, 2010, 1:34 AM