A Function To Simplify ExecuteNonQuery Statements

Category:
C#, VB.NET, ASP.NET
Type:
Snippets
Difficulty:
Beginning
Author:
Anonymous

Version Compatibility: Visual Basic.NET

More information:
Use this function to simplify ExecuteNonQuery. Normally, you need to setup a command and connection objects, which this code does. Just pass the SQL statement and the connection object that points to your database.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: