Namespace: EDKB12WS.edokaDB
Assembly: EDKB12WS (in EDKB12WS.exe)

Syntax

Visual Basic

Public Overrides Function SelectAll() As DataTable

C#

public override DataTable SelectAll()

C++

public: 
DataTable^ SelectAll() 

JScript

public function SelectAll() : DataTable;

 

Source code

Visual Basic

 Public Overrides Function SelectAll() As DataTable
    Dim scmCmdToExecute As SqlCommand = New SqlCommand()
    scmCmdToExecute.CommandText = "dbo.[pr_Office_Vorlage_Datei_SelectAll]"
    scmCmdToExecute.CommandType = CommandType.StoredProcedure
    Dim dtToReturn As DataTable = New DataTable("Office_Vorlage_Datei")
    Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
 
    ' // Use base class' connection object
    scmCmdToExecute.Connection = m_scoMainConnection
 
    Try
        scmCmdToExecute.Parameters.Add(New SqlParameter("@iErrorCode", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, m_iErrorCode))
 
        If m_bMainConnectionIsCreatedLocal Then
            ' // Open connection.
            m_scoMainConnection.Open()
        Else
            If m_cpMainConnectionProvider.bIsTransactionPending Then
                scmCmdToExecute.Transaction = m_cpMainConnectionProvider.stCurrentTransaction
            End If
        End If
 
        ' // Execute query.
        sdaAdapter.Fill(dtToReturn)
        m_iErrorCode = New SqlInt32(CType(scmCmdToExecute.Parameters.Item("@iErrorCode").Value, SqlInt32))
 
        If Not m_iErrorCode.Equals(New SqlInt32(LLBLError.AllOk)) Then
            ' // Throw error.
            Throw New Exception("Stored Procedure 'pr_Office_Vorlage_Datei_SelectAll' reported the ErrorCode: " & m_iErrorCode.ToString())
        End If
 
        Return dtToReturn
    Catch ex As Exception
        ' // some error occured. Bubble it to caller and encapsulate Exception object
        Throw New Exception("clsOffice_Vorlage_Datei::SelectAll::Error occured.", ex)
    Finally
        If m_bMainConnectionIsCreatedLocal Then
            ' // Close connection.
            m_scoMainConnection.Close()
        End If
        scmCmdToExecute.Dispose()
        sdaAdapter.Dispose()
    End Try
 End Function 

Platforms

Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

 

Version Information

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0
 

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0
 

XNA Framework

Supported in: 3.0, 2.0, 1.0
 

 

See Also