Error with EntityCollectionNonGeneric, Webservice, and WinForms

Posts   
 
    
Meteor
User
Posts: 67
Joined: 06-Apr-2007
# Posted on: 02-Oct-2007 03:25:05   

Using LLBLGen Pro v2.5 and VS2005 winforms application. Retrieving data via a web service and using the Adapter model with SchemaImporter, DBSpecific and DBGeneric projects generated.

Up until now I have been using SelfServicing exclusively, however I believe that I need to use the adapter model for the webservice. I've followed your (very concise) instructions on generating the code projects and adding to the solution, as well as strong naming, adding to GAC, post-build operations etc.

With the SS model, there was always, magically, a list of available datasources in the vs2005 toolbox, so I only had to drag the right one onto the form. Now using the Adapter, there is nothing in the toolbox. I followed your instructions to add the correct version of the LLBLGenProDataSource2 to the toolbox, and yes, it appears there ('EntityCollectionNonGeneric'), however when I drag this onto the winform and try to select an 'Entity Factory to Use' (BTW, there is only one: SD.LLBLGenPro.ORMSupportClasses.EntityFactoryCore2'), I get the attached error - Error invoking 'Set Entity factory to use'. Cannot create abstract class'.

I realise that I need to reference the DatabaseGeneric project in my form, rather than the DBSpecific, however I'm confused as to how I get the Entity and Collection datasource controls to appear in the toolbox, like they did with SS. I tried building the DatabaseGeneric project and adding the resulting dll to the toolbox using 'Choose Items', but received the error 'There are no components in blah blah blah that can be added to the toolbox.'

In my Winforms project, I have references to the DatabaseGeneric project, the WebService project and the (correct) ORMSupportClasses library.

Could you please advise? confused

Thanks

Attachments
Filename File size Added on Approval
DataSourceError.gif 19,573 02-Oct-2007 03:27.18 Approved
Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 02-Oct-2007 12:22:33   

however I'm confused as to how I get the Entity and Collection datasource controls to appear in the toolbox, like they did with SS

Use one solution to include the application project and the generated code projects. Add the DBGeneric project and The ORMSupportClass..dll as references to the application. Then Re-Build the solution. You might need to close the V.S and re-open it again. Now if you don't find the LLBLGenProDataSource2 in the toolbox. Similarly in a windows application you should find the EntityCollection in the toolbox.

Meteor
User
Posts: 67
Joined: 06-Apr-2007
# Posted on: 03-Oct-2007 00:44:20   

Use one solution to include the application project and the generated code projects. Add the DBGeneric project and The ORMSupportClass..dll as references to the application. Then Re-Build the solution. You might need to close the V.S and re-open it again.

Thanks. I did have everything in the one solution, and I did compile everything, but with the winform in design view, there was still nothing in the toolbox.

I am having problems with retrieving entities/collections from the webservice, so I rebooted the machine and Voila, the component suddenly appeared sunglasses

I'll create a new thread for the webservice problems.