Microsoft Azure Development Cookbook: Second Edition by Roberto Freato & Neil Mackenzie

Microsoft Azure Development Cookbook: Second Edition by Roberto Freato & Neil Mackenzie

Author:Roberto Freato & Neil Mackenzie [Freato, Roberto]
Language: eng
Format: azw3, mobi, epub
Publisher: Packt Publishing
Published: 2014-09-24T16:00:00+00:00


Add the following method, updating a row in the Writer table, to the classpublic Int32 UpdateRow() { String commandText = @"UPDATE Writer SET Name=@Name WHERE Id=3"; Int32 rowsAffected; using (SqlConnection connection =new SqlConnection(connectionString)) { connection.Open(); using (SqlCommand sqlCommand =new SqlCommand(commandText, connection)) { SqlParameter sqlParameter = new SqlParameter() { ParameterName = "@Name", Value = "Stendhal", SqlDbType = SqlDbType.NVarChar, Size = 20 }; sqlCommand.Parameters.Add(sqlParameter); rowsAffected = sqlCommand.ExecuteNonQuery(); } } return rowsAffected; }



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.