<i><b>Originally posted by : Deepak Kashyap (deepkash@yahoo.com)</b></i><br />From a few articles which i have read i have understood that to update the database we have two methods.<br />the first one is through the command object:<br />Dim SQlStmt As String = "UPDATE Customers SET Age=20 WHERE ID=2"<br />Dim myCommand As ADOCommand = New ADOCommand(SQLStmt, myConnection)<br /><br />the second one is through the datasetcommand<br /><br />Dim workDS As DataSet = New DataSet("myDataSet")<br />Dim workDSCMD As ADODataSetCommand = New ADODataSetCommand _<br />("SELECT * FROM Customers", _<br />"Provider=SQLOLEDB.1;Initial Catalog=Northwind;" & _<br />"Data Source=MyServer;User ID=sa;")<br />workDSCMD.FillDataSet(workDS, "Customers")<br />' Make some changes to the customer data in the DataSet.<br />workDSCMD.Update(workDS, "Customers")<br /><br />