Old Firebird template bug from 2.5 is reintroduced in 2.6

Posts   
 
    
kaiboe
User
Posts: 20
Joined: 04-Jul-2006
# Posted on: 11-Jul-2008 10:33:18   

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 simple_smile 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

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 11-Jul-2008 11:09:16   

Thanks for reporting this, we will check it out and fix it for the next release.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 14-Jul-2008 15:21:33   

Thanks for reporting simple_smile It is indeed a merge issue, we forgot to merge the fix into the 2.6 branch. I'll do that a.s.a.p. and attach the new template here so you can use that till the next build is released. simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 14-Jul-2008 18:50:24   

The templates haven't been changed since v2.5, so you can use these stored procedure templates till a new build is released, which is later this week.

Frans Bouma | Lead developer LLBLGen Pro
kaiboe
User
Posts: 20
Joined: 04-Jul-2006
# Posted on: 14-Jul-2008 19:09:11   

Thanks Otis and Waala for quick replies and excellent service.

Best wishes