on 07-31-2012 8:00 AM
Hi experts,
how we can write a insert into query through string
Hi Nikhil,
Try this...
SAPbobsCOM.Recordset oRecSet3 = (SAPbobsCOM.Recordset)SBO_Company.GetBusinessObject(BoObjectTypes.BoRecordset);
double Initial = Convert.ToDouble(oRecSet2.Fields.Item("U_IntlTtl").Value);
string Challan = Convert.ToString(oRecSet2.Fields.Item("U_TotalC1").Value);
double Freight = Convert.ToDouble(oRecSet2.Fields.Item("U_Fht1").Value);
double Halting = Convert.ToDouble(oRecSet2.Fields.Item("U_Halt").Value);
double Loading = Convert.ToDouble(oRecSet2.Fields.Item("U_Loading").Value);
double HL = Convert.ToDouble(oRecSet2.Fields.Item("U_HL").Value);
double DocTotal = Convert.ToDouble(oRecSet2.Fields.Item("U_DocTotal").Value);
double Amount = 0.0;
double Advance = 0.0;
double Balance = 0.0;
string Insert = "Insert into [@PAYMENTBINDING] values ('" + Challan + "','" + Initial + "','" + Freight + "','" + Halting + "','" + Loading + "','" + HL + "','" + DocTotal + "', '" + Amount + "','" + Advance + "','" + Balance + "')";
oRecSet3.DoQuery(Insert);
Hope it helps
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.