none
An unhandled exception of type 'System.StackOverflowException' occurred in App_Code.kh_bollf.dll RRS feed

  • Question

  • I am receiving the following message when invoking my BLL.  Does anyone know what this message means?   The message is "An unhandled exception of type 'System.StackOverflowException' occurred in App_Code.kh_bollf.dll".   My BLL code is as follows:

    Imports Microsoft.VisualBasic

    Imports qry_DirectoryForeignLanguageTableAdapters

    Imports System.Data.Common

    Public Class DirectoryForeignLanguage

    Private _DirectoryForeignLanguaugeAdapter As DirectoryForeignLanguageTableAdapter = Nothing

    Protected ReadOnly Property Adapter() As DirectoryForeignLanguageTableAdapter

    Get

    If _DirectoryForeignLanguaugeAdapter Is Nothing Then

    _DirectoryForeignLanguaugeAdapter = New DirectoryForeignLanguageTableAdapter()

    End If

    Return _DirectoryForeignLanguaugeAdapter

    End Get

    End Property

    <System.ComponentModel.DataObjectMethodAttribute(ComponentModel.DataObjectMethodType.Select, True)> _

    Public Function GetDataStaffForeignDirectory() As DirectoryForeignLanguageTableAdapter

    Return GetDataStaffForeignDirectory()

    End Function

    End Class

    Wednesday, December 24, 2008 2:42 PM

Answers

  • Your GetDataStaffForeignDirectory method implementation is flawed.  It calls itself.  That works for a couple of thousand times, then goes boom when the stack fills up to capacity.
    Hans Passant.
    • Marked as answer by Zhi-Xin Ye Tuesday, December 30, 2008 9:35 AM
    Wednesday, December 24, 2008 3:02 PM
    Moderator