First Time Compile - What's Going On

Posts   
 
    
Gazley
User
Posts: 18
Joined: 17-Apr-2006
# Posted on: 19-Nov-2006 19:40:21   

Using the HowTo section, I have tried to use the following code:-

     DataAccessAdapter adapter = new DataAccessAdapter(true);
        CustomerEntity customer = new CustomerEntity(1);
        adapter.FetchEntity(customer);
        adapter.CloseConnection();

When I compile the solution, I get the following range of errors that I dont understand and then the specific errors 78 and 79 relative to the customer entity being of the wrong type. I only downloaded today, this is my first time, please bear with me simple_smile Thanks a lot.

Error 1 The namespace 'Melrose.HelperClasses' already contains a definition for 'FieldInfoProviderSingleton' C:\test\DatabaseGeneric\HelperClasses\FieldInfoProvider.cs 24 24 Melrose Error 5 The namespace 'Melrose' already contains a definition for 'AddressFieldIndex' C:\test\DatabaseGeneric\ConstantsEnums.cs 18 14 Melrose Error 78 The best overloaded method match for 'SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntity(SD.LLBLGen.Pro.ORMSupportClasses.IEntity2)' has some invalid arguments C:\Documents and Settings\Gary\My Documents\Visual Studio 2005\Projects\llbltest\llbltest\Form1.cs 32 13 llbltest Error 79 Argument '1': cannot convert from 'Melrose.EntityClasses.CustomerEntity' to 'SD.LLBLGen.Pro.ORMSupportClasses.IEntity2' C:\Documents and Settings\Gary\My Documents\Visual Studio 2005\Projects\llbltest\llbltest\Form1.cs 32 33 llbltest

Gazley
User
Posts: 18
Joined: 17-Apr-2006
# Posted on: 19-Nov-2006 21:47:22   

Further to my earlier message, this is the result of a search:-

Find all "internal sealed class FieldInfoProviderSingleton", Subfolders, Find Results 1, "Entire Solution" C:\test\DatabaseGeneric\HelperClasses\FieldInfoProvider.cs(23): internal sealed class FieldInfoProviderSingleton C:\test\HelperClasses\FieldInfoProvider.cs(24): internal sealed class FieldInfoProviderSingleton Matching lines: 2 Matching files: 2 Total files searched: 618

Why has LLBL generated the same stuff in two places in the same project? This appears to be one part of the problem.

Chester
Support Team
Posts: 223
Joined: 15-Jul-2005
# Posted on: 20-Nov-2006 00:33:32   

Try regenerating the code to a new folder and referencing that new project in your UI project.

Gazley
User
Posts: 18
Joined: 17-Apr-2006
# Posted on: 20-Nov-2006 10:39:06   

Hi Chester

Thanks for the suggestion - I will try that later. In the meantime, any ideas why I was getting the following error :-

Argument '1': cannot convert from 'Melrose.EntityClasses.CustomerEntity' to 'SD.LLBLGen.Pro.ORMSupportClasses.IEntity2' C:\Documents and Settings\Gary\My Documents\Visual Studio 2005\Projects\llbltest\llbltest\Form1.cs 32 33 llbltest

Could this still be to do with the need to regenerate the code?

Many thanks.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 20-Nov-2006 10:41:58   

I have the feeling you generated selfservicing code into an adapter project, is that correct?

Frans Bouma | Lead developer LLBLGen Pro
Gazley
User
Posts: 18
Joined: 17-Apr-2006
# Posted on: 20-Nov-2006 12:38:26   

Hmmm, maybe, I don't really know rage

I will try again later. Thanks for the heads-up simple_smile