ExecuteNonQuery
– returns the number of rows affected.
SqlCommand comm;
// other codes
int numberOfRecords = comm.ExecuteNonQuery();
More Related Contents:
- Error: You have an error in your SQL syntax – but SQL statement works
- How do parameterized queries help against SQL injection?
- What is the syntax for an inner join in LINQ to SQL?
- LINQ to Entities does not recognize the method ‘System.String ToString()’ method, and this method cannot be translated into a store expression
- Read SQL Table into C# DataTable
- Is it possible to use a MySql User Defined Variable in a .NET MySqlCommand?
- ASP.NET use SqlConnection connect MySQL
- LINQ to SQL multiple tables left outer join
- Convert DateTime for MySQL using C#
- Code to validate SQL Scripts
- Does using parameterized SqlCommand make my program immune to SQL injection?
- Executing query with parameters
- C# Version Of SQL LIKE
- Use linq to generate direct update without select
- SqlConnection.Close() inside using statement
- Retrieve an object from entityframework without ONE field
- Join and Include in Entity Framework
- MySql Last Insert ID, Connector .net
- Why is a SQL float different from a C# float
- Sql Bulk Copy/Insert in C#
- Index (zero based) must be greater than or equal to zero
- Check if a SQL table exists
- Issues Doing a String Comparison in LINQ
- Passing datatable to a stored procedure
- How to pass a table as parameter to MySqlCommand?
- Use SQL Server time datatype in C#.NET application?
- Could not load file or assembly ‘MySql.Data, Version=6.2.2.0
- Generating sql code programmatically
- Do we have transactions in MS-Access?
- Is SqlConnection.Close() need inside a Using statement?