Bug in Get<StoredProcedure>CallAsQuery

Posts   
 
    
kaiboe
User
Posts: 20
Joined: 04-Jul-2006
# Posted on: 07-Feb-2008 11:58:49   

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

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 07-Feb-2008 14:37:48   

Would you please state the LLBLGen Pro Designer release date (Help -> About)?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 07-Feb-2008 18:32:10   

Will look into it.

Frans Bouma | Lead developer LLBLGen Pro
kaiboe
User
Posts: 20
Joined: 04-Jul-2006
# Posted on: 07-Feb-2008 23:43:07   

Walaa wrote:

Would you please state the LLBLGen Pro Designer release date (Help -> About)?

Hi Walaa.

The date is Desember 5th, 2007

kaiboe
User
Posts: 20
Joined: 04-Jul-2006
# Posted on: 07-Feb-2008 23:43:35   

Otis wrote:

Will look into it.

Great !

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 08-Feb-2008 10:19:40   

Fixed in next build.

In the Templates\FirebirdSpecific...\retrievalProcedures*.template files, at the bottom, change <[CurrentSPCallName]> into <[ActualStoredProcedureName]>

Frans Bouma | Lead developer LLBLGen Pro
kaiboe
User
Posts: 20
Joined: 04-Jul-2006
# Posted on: 08-Feb-2008 10:31:19   

Otis wrote:

Fixed in next build.

In the Templates\FirebirdSpecific...\retrievalProcedures*.template files, at the bottom, change <[CurrentSPCallName]> into <[ActualStoredProcedureName]>

Thanks Frans smile