title: .Net Error System.ArgumentException: The value can not be null or string or empty in DataLayer
body: <p>I'm having the error "System.ArgumentException: The value can not be null or string or empty."<br>
  At the Line code    </p>
  
  <pre><code>Public Sub New(ByVal databaseName As String)
              **db = New Database(databaseName)**
  End Sub
  </code></pre>
  
  <p>Error Causing Sournce File is "C:\Company\Main\Source\DataLayer\Object2.vb"
  Please find the screen shot.  </p>
  
  <p>Please could you help?</p>
  
  <p><strong>Task Explanation</strong><br>
  Am trying to execute the "db_StoredProcedue" from the below function of mentioned root file.
  C:\Company\Main\Source\Project\App_Code\Application\ResultDataset.vb  </p>
  
  <pre><code>    Imports System.Web.UI
      Imports System.Data
      Imports System.IO
      Imports Company.Web.TMSuite.Workflow
      Namespace Company.Web.TMSuite
      Public Class ResultDataset
          Inherits BasePage
          Public Shared Function GetResultsDataset() As DataSet
              Dim Obj1 As New Workflow(BasePage.DatabaseName)
  
              Dim ds As New DataSet
  
              ds = Obj1.GetResultDataset()
  
              Return ds
  
          End Function
  
      End Class
  
  End Namespace  
  </code></pre>
  
  <p><strong>Obj1 file located in 
    C:\Company\Main\Source\Workflow\Object1.vb</strong>  </p>
  
  <pre><code>Imports System.Globalization
  Imports Company.Web.TMSuite.DataAccess
  Imports Company.Web.TMSuite.TMSuiteComponents
  Public Class Workflow
      Private objResultsData As ResultsData  
  
  Public Sub New(ByVal databaseName As String)
      objMetricsData = New MetricsData(databaseName)
  End Sub
  
  Public Function Obj2() As DataSet
          Return objResultssData.Obj2()
      End Function
  End Class  
  </code></pre>
  
  <p><strong>Obj2 file located in 
    C:\Company\Main\Source\DataLayer\Object2.vb</strong>  </p>
  
  <pre><code>Imports Microsoft.VisualBasic
  Imports System
  Imports System.Data
  Imports System.Configuration
  Imports System.Globalization
  Imports System.Web
  Imports System.Data.Common
  Imports Company.FoundationLibrary.Data
  Imports Company.FoundationLibrary.ExceptionHandling
  Imports Company.Web.TMSuite.DataAccess.ExceptionPolicies
  Imports System.Data.SqlClient
  
  Public Class ResultsData
      Inherits BaseData
  
      Public Sub New(ByVal databaseName As String)
          db = New Database(databaseName)  //Error Throughing at this line as -&gt; ""System.ArgumentException: The value can not be null or string or empty.""
      End Sub
  
    Public Function Obj2() As DataSet
          Dim errorMessage As String = Nothing
          Dim ds As New DataSet
          Dim cmd As DbCommand
  
          ds.Locale = CultureInfo.InvariantCulture
          Try
              cmd = db.GetStoredProcCommand("db_StoredProcedue")
  
              db.AddOutParameter(cmd, "@pErrorMessage", DbType.String, ErrorMessageSize)
  
              ds = db.ExecuteDataSet(cmd)
  
              If Not IsDBNull(db.GetParameterValue(cmd, "@pErrorMessage")) Then
                  errorMessage = db.GetParameterValue(cmd, "@pErrorMessage")
              End If
  
          Catch ex As Exception
  
              Dim blnRethrow As Boolean = ExceptionPolicy.HandleException(ex, DataAccessExceptionPolicy)
  
              If blnRethrow Then
                  Throw
              End If
          End Try
  
          Return ds
  
      End Function
  End Class  
  </code></pre>
  
  <p>Please let me know, If I have to post additional code to resolv this issue.</p>