Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Exception in Business Object GetDataset
Message
De
20/01/2005 18:09:12
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Exception in Business Object GetDataset
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
00979122
Message ID:
00979122
Vues:
53
I am getting a "Cannot create a child list for field Visitor Types" exception.
This is occuring in my function GetAllVisitorTypes on the line Dim dsVisitorTypes As DataSet...

I believe I caused the problem when I added a referenced dataset to the form designer in order to bind my MMUltraGrid columns to the same typed dataset schema I configured for my business object.
Need help correcting this problem.
I'd really like to be able to have this form have this dataset on the designer in order for the Infragistics control to use the schema rather than having to manually define the schema.
How can I design a compromise to solving this exception?

Business Object Function in which the exception is being thrown from:
    Public Function GetAllVisitorTypes() As DataSet
        ' Get a reference to the data access object
        Dim dao As mmDataAccessBase = Me.GetDataAccessObject()

        ' Create and configure parameter objects
        'Dim param1 As IDbDataParameter = dao.CreateParameter("@CustomerID", custID)
        'Dim param2 As IDbDataParameter = dao.CreateParameter("@EmployeeID", employeeID)

        ' Get a DataSet filled with the result set
        'Return Me.GetDataSet("SELECT * FROM Orders WHERE CustomerID = @CustomerID AND " +
        '	"EmployeeID = @EmployeeID", param1, param2)
        Dim dsVisitorTypes As DataSet = _
        Me.GetDataSet( _
            "SELECT * FROM VisitorTypes")
        Return dsVisitorTypes
    End Function
The WinForm code is as follows:
Imports System.Data
Imports OakLeaf.MM.Main.Business
Imports OakLeaf.MM.Main.Windows.Forms
Imports TSG.StellarVisiTrak.Business

Public Class VisitorTypeForm
    Inherits OakLeaf.MM.Main.Windows.Forms.mmBusinessForm

    ' Declare class variables to use for busness objects and datasets
    Private oVisitorType As VisitorType
    Private dsVisitorType As VisitorTypeDataset

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'Instantiate and register business objects with the form
        Me.oVisitorType = CType(Me.RegisterPrimaryBizObj(New VisitorType), VisitorType)
        'Me.oParticipantCheckDetail = CType(Me.RegisterBizObj(New ParticipantCheckDetail), ParticipantCheckDetail)

        ' Register ParticipantCheckDetail as a child of ProcessingBatch
        'oProcessingBatch.RegisterChildBizObj(oParticipantCheckDetail, "ParticipantCheckDetail")

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

        ' Retrieve all Visitor Types
        Me.oVisitorType.GetAllVisitorTypes()

    End Sub ........
THANKS
Joe Salvatore, Programmer/Analyst - The Stellar Group
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform