I am running SQL 2005 Standard Server. I am using Visual Studio 2010 for development.
Let me just say that what I have below works, I would just like to have some constructive critisism.
Is this the best way?
Is there a better way?
Are there any things I need to look out for doing it this way?
Any help would be greatly appreciated,
Dim InsertQuery As String = "INSERT USING STORED PROCEDURE" Using myConnection As New System.Data.SqlClient.SqlConnection("ConnectionString") Using myCommand As New System.Data.SqlClient.SqlCommand(InsertQuery, myConnection) Dim retvalue As Integer myConnection.Open() retvalue = myCommand.ExecuteNonQuery() Console.WriteLine(retvalue) End Using End Using End Sub