Databinding Problem

Posts   
 
    
ccotton333
User
Posts: 4
Joined: 05-Jul-2005
# Posted on: 06-Jul-2005 02:19:05   

Hey guys, I'm new to LLBLGEN PRO, and our office is wanting to use this product to make it faster to create our programs. I'm having a problem with databinding though, so if anyone could help me with this I would appreciate it. Here is the code I am trying to use:


Public Sub Category()
        'this will open up and bind the data to the proper controls
        Try
            'this will fetch the information from the ActivityType Table on the SQL Server
            Dim adapter As New DataAccessAdapter
            Dim cats As New EntityCollection(New ActivityEntityFactory)
            adapter.FetchEntityCollection(cats, Nothing)
            Dim coll As New EntityCollection(New ActivityEntityFactory)
            cboCategory.DataSource = coll
            cboCategory.DataTextField = "description"
            cboCategory.DataValueField = "activityTypeID"
            cboCategory.DataBind()
            lblMessage.Text = "Worked"
        Catch ex As Exception
            lblMessage.Text = "Didn't Work"
        End Try
End Sub

Thank you guys for all the help, Chris Cotton

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 06-Jul-2005 07:24:38   

You're fetching data in cats, though you're binding to coll. Perhaps that's the problem? It also would be a great help if you could describe what's not working simple_smile as I now have to guess, and it then might take longer before you get an answer.

Frans Bouma | Lead developer LLBLGen Pro