


For example: Public Shared Function CheckSecurity(strUserID$, strOperation$, strAppID$) As Boolean Throw New ApplicationException("GET DATA TABLE ERROR")Īs far as I can tell the resources in this code are being properly deallocated. If M圜onnection.State = ConnectionState.Open ThenĬode for getDataTableFromSqlCMD: Public Shared Function getDataTableFromSqlCmd(ByVal sqlCmd As SqlCommand) As DataTableĭim MyAdapter As New SqlDataAdapter(sqlCmd) Throw New ApplicationException("SECURITY ACCESS ERROR") If getDataTableFromSqlCmd(sqlCmd).Rows.Count > 0 Then With SqlDbType.VarChar, 15).Value = SqlDbType.VarChar, 50).Value = SqlDbType.VarChar, 50).Value = strOperation SbSQL.AppendLine("EXEC dbo.CheckSecurity = sbSQL.ToString

M圜onnection.ConnectionString = ConnString Public Shared Function CheckSecurity(ByVal strUserID As String, ByVal strOperation As String, ByVal strAppID As String) As Booleanĭim M圜onnection As SqlConnection = New SqlConnection()ĭim sqlCmd As SqlCommand = New SqlCommand Public Shared ConnString As String = ConfigurationManager.ConnectionStrings("connection").ConnectionString Here's what the code looks like: Imports In our latest Veracode scan for an application, I have come across the issue of Improper Resource Shutdown or Release.
