Problem Getting functions to work

Posts   
 
    
ccotton333
User
Posts: 4
Joined: 05-Jul-2005
# Posted on: 05-Jul-2005 17:21:49   

Hey, The company I work for just got this program, and I have read through the documentation. The problem I'm having is this: after I add the references to my project of the project files generated by LLBLGEN Pro. I import the namespaces, but when I have attempted some of the functions that were in the documentation I can't get them to work. For Example: ' [VB.NET] Dim product As New ProductEntity(10) Dim adapter As New DataAccessAdapter() adapter.FetchEntityCollection(product.Orders, product.GetRelationInfoOrders())

I can't seem to get it to work. If someone could help me out figure out what I'm doing wrong, I would greatly appreciate it. Thanks, Chris Cotton simple_smile

jeffreygg
User
Posts: 805
Joined: 26-Oct-2003
# Posted on: 05-Jul-2005 19:00:24   

ccotton333 wrote:

Hey, The company I work for just got this program, and I have read through the documentation. The problem I'm having is this: after I add the references to my project of the project files generated by LLBLGEN Pro. I import the namespaces, but when I have attempted some of the functions that were in the documentation I can't get them to work. For Example: ' [VB.NET] Dim product As New ProductEntity(10) Dim adapter As New DataAccessAdapter() adapter.FetchEntityCollection(product.Orders, product.GetRelationInfoOrders())

I can't seem to get it to work. If someone could help me out figure out what I'm doing wrong, I would greatly appreciate it. Thanks, Chris Cotton simple_smile

Hi, there. Can you give some more information? For example, are you getting error messages, is the collection getting filled, etc. Thanks.

Jeff...

ccotton333
User
Posts: 4
Joined: 05-Jul-2005
# Posted on: 05-Jul-2005 22:03:27   

Ok. For instance these functions cause an error in the code itself before I even compile:

CustomerCollection allCustomers = new CustomerCollection(); allCustomers.GetMulti(null);

the GetMulti part of this seems to be in error because it doesn't recognize the GetMulti part of the command.

For instance, I'm wanting to find all records in a table as well and can't seem to figure out what I'm doing wrong with that either.

Any Suggestions/Help with these problem would be appreciated.

Thanks, Chris Cotton

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 05-Jul-2005 22:17:26   

Adapter doesn't have GetMulti, your first posting shows adapter code simple_smile

So, instead of using GetMulti(), use:


EntityCollection customers = new EntityCollection(new CustomerEntityFactory());
adapter.FetchEntityCollection(customers, null);

which will fetch all customers. Also check the How do I section in the best practises section of the manual which discusses this example as well simple_smile

Frans Bouma | Lead developer LLBLGen Pro