----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: dnyanesh Message 1 in Discussion Hi All, I have a dotnet desktop application where i am using a Datagrid control. I am populating the Dataset using a select statement consisting of a join query. Now i want to update the data back to database using a DataAdapter class's Update method. I am interested in updating a data releated to first table only. So I am using code as below for Bulk update: SqlCommand sqlUpdateCommand = new SqlCommand(); sqlUpdateCommand.CommandText = ""; SqlParameter p0 = new SqlParameter( "@p0", SqlDbType.Int ); p0.SourceColumn = "id"; p0.SourceVersion = DataRowVersion.Original; SqlParameter p1 = new SqlParameter( "@p1", SqlDbType.DateTime ); p1.SourceColumn = "Date"; p1.SourceVersion = DataRowVersion.Original; sqlUpdateCommand.CommandText = "update ToolCrib set [Date]= @p1 Where id = @p0"; sqlUpdateCommand.Connection = connection; this.sqlDataAdapter.UpdateCommand = sqlUpdateCommand; this.sqlDataAdapter.Update(dsToolCrib.Tables[0]); _______________________________________________ I am not getting any exception but data also not get updated in to the database. Can any body help me out here. I am just wondering whether is it possible to have a bulk update using a dataadapter when i have populated my a dataset using select query consisting of a innerjoin. Thanks a advance -dn ----------------------------------------------------------- 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]
