@@ -16,29 +16,29 @@ private static void AdapterUpdate(string connectionString)
1616 using ( SqlConnection connection =
1717 new SqlConnection ( connectionString ) )
1818 {
19- SqlDataAdapter dataAdpater = new SqlDataAdapter (
19+ SqlDataAdapter dataAdapter = new SqlDataAdapter (
2020 "SELECT CategoryID, CategoryName FROM Categories" ,
2121 connection ) ;
2222
23- dataAdpater . UpdateCommand = new SqlCommand (
23+ dataAdapter . UpdateCommand = new SqlCommand (
2424 "UPDATE Categories SET CategoryName = @CategoryName " +
2525 "WHERE CategoryID = @CategoryID" , connection ) ;
2626
27- dataAdpater . UpdateCommand . Parameters . Add (
27+ dataAdapter . UpdateCommand . Parameters . Add (
2828 "@CategoryName" , SqlDbType . NVarChar , 15 , "CategoryName" ) ;
2929
30- SqlParameter parameter = dataAdpater . UpdateCommand . Parameters . Add (
30+ SqlParameter parameter = dataAdapter . UpdateCommand . Parameters . Add (
3131 "@CategoryID" , SqlDbType . Int ) ;
3232 parameter . SourceColumn = "CategoryID" ;
3333 parameter . SourceVersion = DataRowVersion . Original ;
3434
3535 DataTable categoryTable = new DataTable ( ) ;
36- dataAdpater . Fill ( categoryTable ) ;
36+ dataAdapter . Fill ( categoryTable ) ;
3737
3838 DataRow categoryRow = categoryTable . Rows [ 0 ] ;
3939 categoryRow [ "CategoryName" ] = "New Beverages" ;
4040
41- dataAdpater . Update ( categoryTable ) ;
41+ dataAdapter . Update ( categoryTable ) ;
4242
4343 Console . WriteLine ( "Rows after update." ) ;
4444 foreach ( DataRow row in categoryTable . Rows )
0 commit comments