前提条件:不使用CommandBuilder生成SQL语句,而使用手动方法使用Update去更新数据表,这些InsertCommand、UpdateCommand、DeleteCommand该如何使用?请高手指点一下.谢谢.原码如下:(C#)
void Page_Load(Object sender , EventArgs e) 
{
DataSet dstPubs;
SqlConnection conPubs;
SqlDataAdapter dadTitles;
DataTable dtblTitles;
DataRow drowTitle;
SqlCommandBuilder  objCommandBuilder = new SqlCommandBuilder(); // Grab Titles Table
dstPubs = new DataSet();
conPubs = new SqlConnection( @"Server=localhost;Database=Pubs;Integrated Security=SSPI" );
dadTitles = new SqlDataAdapter( "Select * from Titles", conPubs );
dadTitles.Fill( dstPubs, "Titles" );
dtblTitles = dstPubs.Tables[ "Titles" ]; // Display Original Titles Table
dgrdOriginalTitles.DataSource = dstPubs;
dgrdOriginalTitles.DataBind(); // Add a Row
drowTitle = dtblTitles.NewRow();
drowTitle[ "Title_id" ] = "xxxx";
drowTitle[ "Title" ] = "ASP.NET Unleashed";
drowTitle[ "Price" ] = 1200.00;
drowTitle[ "Type" ] = "Mystery";
drowTitle[ "PubDate" ] = System.DateTime.Now;
dtblTitles.Rows.Add( drowTitle ); // Delete the First Row
//dtblTitles.Rows( 0 ).Delete(); // double the price of the Second Row
//drowTitle = dtblTitles.Rows( 2 );
drowTitle[ "Price" ] = 2; // Generate the SQL Commands
objCommandBuilder = new SqlCommandBuilder( dadTitles ); // Update Titles Table
//dadTitles.Update( dstPubs, "Titles" ); // Display new Titles Table
dgrdNewTitles.DataSource = dstPubs;
dgrdNewTitles.DataBind();
}</Script>如何改写成手动去修改??