Hi,
On February 7th 2008, I reported a bug in the Firebird template for Stored Procedure. This was fixed in the next release. However, it's now reintroduced in 2.6. Suppose it's a fork issue I've fixed the error for now, but I would rather not have to remember this each time I update LLBLGen.
I'm using VS2008, LLBLGEN 2.6 Final with June 6th 2008 date in About dialog.
Anyway, here's the orginal message from 07.02.2008:
"Hi. There's a small, but important bug in the Get<StoredProcedure>CallAsQuery. It's probably in the template."
public static DataTable GetWareslistForCountGroup(System.Int32 countgroupno, DataAccessAdapter adapter)
{
FbParameter[] parameters = new FbParameter[4];
parameters[0] = new FbParameter("@COUNTGROUPNO", FbDbType.Integer, 4, ParameterDirection.Input, true, 0, 0, "", DataRowVersion.Current, countgroupno);
DataTable toReturn = new DataTable("GetWareslistForCountGroup");
bool hasSucceeded = adapter.CallRetrievalStoredProcedure("STPGETWARESLIST_FORCOUNTGROUP", parameters, toReturn);
return toReturn;
}
/// <summary>Creates an IRetrievalQuery object for a call to the procedure 'STPGETWARESLIST_FORCOUNTGROUP'.
///
/// </summary>
/// <param name="countgroupno">Input parameter of stored procedure</param>
/// <returns>IRetrievalQuery object which is ready to use for datafetching</returns>
public static IRetrievalQuery GetGetWareslistForCountGroupCallAsQuery( System.Int32 countgroupno)
{
RetrievalQuery toReturn = new RetrievalQuery( new FbCommand("GetWareslistForCountGroup" ) );
toReturn.Parameters.Add(new FbParameter("@COUNTGROUPNO", FbDbType.Integer, 4, ParameterDirection.Input, true, 0, 0, "", DataRowVersion.Current, countgroupno));
toReturn.Command.CommandType = CommandType.StoredProcedure;
return toReturn;
}
The GetWareslistForCountGroup procedure above uses the right name for the sp: STPGETWARESLIST_FORCOUNTGROUP, while the GetGetWareslistForCountGroupCallAsQuery uses the name that I've given it in LLBLGen designer (GetWareslistForCountGroup) and therefore an "not found exception" is thrown.
TIA
Best wishes
Kai