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