// C#
public static void AdapterUpdate(string connStr)
{
string cmdStr = "SELECT EMPNO, EMPNAME, SALARY FROM EMPINFO";
//create the adapter with the selectCommand txt and the
//connection string
OracleDataAdapter adapter = new OracleDataAdapter(cmdStr, connStr);
//get the connection from the adapter
OracleConnection connection = adapter.SelectCommand.Connection;
//create the UpdateCommand object for updating the EMPINFO table
//from the dataset
adapter.UpdateCommand = new OracleCommand(
"UPDATE EMPINFO SET SALARY = "+ " :iSALARY where EMPNO = :iEMPNO", connection);
adapter.UpdateCommand.Parameters.Add(":iSALARY", OracleDbType.Double,0, "SALARY");
adapter.UpdateCommand.Parameters.Add(":iEMPNO", OracleDbType.Int16,0, "EMPNO");
//Create and fill the DataSet using the EMPINFO
DataSet dataset = new DataSet();
adapter.Fill(dataset, "EMPINFO");
//Get the EMPINFO table from the dataset
DataTable table = dataset.Tables["EMPINFO"];
//Get the first row from the EMPINFO table
DataRow row0 = table.Rows[0];
//update the salary in the first row
row0["SALARY"] = 99999.99;
//Now update the EMPINFO using the adapter, the salary
//of ’KING’ is changed to 99999.99
adapter.Update(dataset, "EMPINFO");
}