Compile error in DataAccessAdapter

Posts   
 
    
aol
User
Posts: 20
Joined: 24-Aug-2006
# Posted on: 31-Oct-2006 11:49:09   

I'm suddenly havin problems compiling the DataAccessAdapter class. I think it has happended after I added the first StoredProcedure to my project. I'm still not calling the StoredProcedure from my code, so I don't know if I can actually execute the Stored procedure.

A little configuration information: - I'm using LLBLGen Pro version 2.0.0.0 Final - We are using the Adapter Template Group for C# and .NET 2.0 - We are using the following Template Bindings (in order): - SqlServerSpecific.NET20 - SharedTemplates.NET20 - SharedTemplates.BackwardsCompatibility.NET20

When I generate the code and try to compile it, Visual Studio complains that this method can not be compiled:

public override IDataReader FetchDataReader(IRetrievalQuery queryToExecute, CommandBehavior readerBehavior) { if(queryToExecute.Command.CommandType == CommandType.StoredProcedure) { queryToExecute.Command.CommandText = CreateCorrectStoredProcedureName(queryToExecute.Command.CommandText); } return base.FetchDataReader(queryToExecute, readerBehavior); }

The error message that I get is:

'DataAccessAdapter.FetchDataReader(SD.LLBLGen.Pro.ORMSupportClasses.IRetrievalQuery, System.Data.CommandBehavior)': cannot override inherited member 'SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchDataReader(SD.LLBLGen.Pro.ORMSupportClasses.IRetrievalQuery, System.Data.CommandBehavior)' because it is not marked virtual, abstract, or override

If I revert back to the previous version of the DataAccessAdapter (before I added StoredProcedures), it compiles just fine.

I have tried to compare the two versions of the DataAccessAdapter, and as far as I can see, the differences are the following: - The new version have the FetchDataReader method. - The new version have a method called: "CreateCorrectStoredProcedureName". This method uses DynamicQueryEngine to find the stored procedure name. - The old version used DynamicQueryEngine inline in the methods "CallRetrievalStoredProcedure" and "CallActionStoredProcedure", and the new version uses the new CreateCorrectStoredProcedureName method.

Why do I suddenly see these problems? Have I made some mistakes in the configuration of LLBLGen Pro?

Thank you for your help

Regards Anders Olsen

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 31-Oct-2006 12:55:18   

what are the: - buildnr of llblgen pro (about box) - runtimelib buildnr (see guidelines)

Frans Bouma | Lead developer LLBLGen Pro
aol
User
Posts: 20
Joined: 24-Aug-2006
# Posted on: 01-Nov-2006 16:10:31   

Hello Otis

Thank you for your reply.

The version of LLBLGen Pro is 2.0.0.0 Final (That is the only information I can see find in the About box in the LLBLGen designer).

The version of the Runtime Libraries are: 2.0.0.60701

Regards Anders

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 01-Nov-2006 16:21:23   

The version of the Runtime Libraries are: 2.0.0.60701

That's a very early version. Would you please try to download and use the latest release of the LLBLGen Pro. Re-Generate and rebuild, and see if the problem still exists.

aol
User
Posts: 20
Joined: 24-Aug-2006
# Posted on: 01-Nov-2006 20:53:08   

I'll do that tomorrow when I get back to work.

Do you have a link to where I can download the latest version? Just to make sure that I get the right version.

Regards Anders

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 01-Nov-2006 22:07:21   

login to the customer area, click on the version number at the left of your choice and download the Full version installer simple_smile

Frans Bouma | Lead developer LLBLGen Pro
aol
User
Posts: 20
Joined: 24-Aug-2006
# Posted on: 02-Nov-2006 10:46:23   

I have just updated LLBLGen to the latest version, and that fixed the problem.

Thank you for your help.

Regards Anders