Dim myCon As New System.Data.SqlClient.SqlConnection myCon.ConnectionString = "Persist Security Info=False;Integrated Security=SSPI;database=northwind;server=mySQLServer" Dim myCmd As New System.Data.SqlClient.SqlCommand With myCmd .Connection = myCon .CommandText = "INSERT INTO [Customers] (CompanyName) VALUES ('MyCompany')" .CommandType = CommandType.Text End With myCon.Open() If myCmd.ExecuteNonQuery() <> 1 Then ' An error occurred, do something End If myCon.Close()