----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: vijaykishan Message 1 in Discussion Hi, I am working C# winforms - Framework 1.1. i have fetched values from 2 database tables using join and binded the same to a grid. After modifying the values in the grid, i have to update the modified rows to the database. How to update using dataadapter.update/updatecommand i have added the code below for your ref. [Code] DataSet dstMulti = new DataSet(); string lsMultiUpdQry = "select o.OrderId,o.shipname,od.unitprice from orders o inner join [order details] od on o.orderid = od.orderid"; sqAda = new SqlDataAdapter(); sqAda.SelectCommand = new SqlCommand(lsMultiUpdQry, sqConn); SqlCommandBuilder sqCmdBuildMulti = new SqlCommandBuilder(sqAda); sqAda.Fill(dstMulti); grdOrderDetails.DataSource = dstMulti.Tables[0]; grdOrderDetails.SetDataBinding(dstMulti,dstMulti.Tables[0].TableName); sqAda.Dispose(); [/Code] Thanks in advance vijaykishan.s ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/bdotnet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
