Hi. There's a small, but important bug in the Get<StoredProcedure>CallAsQuery. It's probably in the template.
I'm using VS2008, LLBLGen 2.5 Final, Firebird 2.03 database
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.
Best wishes
Kai Bohli