in

CodeSmith Community

Your Code. Your Way. Faster!

TList not generating

Last post 01-06-2007 1:10 PM by vcif. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-04-2007 9:51 PM

    TList not generating

    I have a custom stored procedure that only builds Dataset objects and I need a TList.

    Here is the SQL:

    set ANSI_NULLS OFF

    set QUOTED_IDENTIFIER ON

    GO

    /*

    ----------------------------------------------------------------------------------------------------

    -- Date Created: Friday, December 01, 2006

    -- Created By: ProWeb Internet Group ()

    -- Purpose: Select records from the ProWeb_SM_Projects table that are installed and active.

    ----------------------------------------------------------------------------------------------------

    */

     

    ALTER PROCEDURE [dbo].[cusp_ProWeb_SM_Projects_GetByShowInstalled]

    (

    @Show bit,

    @Installed bit

    )

    AS

    SELECT

    [project_code],

    [project_description],

    [show],

    [installed],

    [portalid],

    [moduleid]

    FROM dbo.[ProWeb_SM_Projects]

    WHERE

    [show] = @Show AND [installed] = @Installed

    ORDER BY [project_description]

    The generated code is as follows:

    #region cusp_ProWeb_SM_Projects_GetByShowInstalled

     

    /// <summary>

    /// This method wrap the 'cusp_ProWeb_SM_Projects_GetByShowInstalled' stored procedure.

    /// </summary>

    /// <param name="show"> A <c>System.Boolean?</c> instance.</param>

    /// <param name="installed"> A <c>System.Boolean?</c> instance.</param>

    /// <remark>This method is generate from a stored procedure.</remark>

    /// <returns>A <see cref="DataSet"/> instance.</returns>

    public DataSet GetByShowInstalled(System.Boolean? show, System.Boolean? installed)

    {

    return GetByShowInstalled(null, 0, int.MaxValue , show, installed);

    }

     

    /// <summary>

    /// This method wrap the 'cusp_ProWeb_SM_Projects_GetByShowInstalled' stored procedure.

    /// </summary>

    /// <param name="show"> A <c>System.Boolean?</c> instance.</param>

    /// <param name="installed"> A <c>System.Boolean?</c> instance.</param>

    /// <param name="start">Row number at which to start reading, the first row is 0.</param>

    /// <param name="pageLength">Number of rows to return.</param>

    /// <remark>This method is generate from a stored procedure.</remark>

    /// <returns>A <see cref="DataSet"/> instance.</returns>

    public DataSet GetByShowInstalled(int start, int pageLength, System.Boolean? show, System.Boolean? installed)

    {

    return GetByShowInstalled(null, start, pageLength , show, installed);

    }

     

    /// <summary>

    /// This method wrap the 'cusp_ProWeb_SM_Projects_GetByShowInstalled' stored procedure.

    /// </summary>

    /// <param name="show"> A <c>System.Boolean?</c> instance.</param>

    /// <param name="installed"> A <c>System.Boolean?</c> instance.</param>

    /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>

    /// <remark>This method is generate from a stored procedure.</remark>

    /// <returns>A <see cref="DataSet"/> instance.</returns>

    public DataSet GetByShowInstalled(TransactionManager transactionManager, System.Boolean? show, System.Boolean? installed)

    {

    return GetByShowInstalled(transactionManager, 0, int.MaxValue , show, installed);

    }

     

    /// <summary>

    /// This method wrap the 'cusp_ProWeb_SM_Projects_GetByShowInstalled' stored procedure.

    /// </summary>

    /// <param name="show"> A <c>System.Boolean?</c> instance.</param>

    /// <param name="installed"> A <c>System.Boolean?</c> instance.</param>

    /// <param name="start">Row number at which to start reading, the first row is 0.</param>

    /// <param name="pageLength">Number of rows to return.</param>

    /// <param name="transactionManager"><see cref="TransactionManager"/> object</param>

    /// <remark>This method is generate from a stored procedure.</remark>

    /// <returns>A <see cref="DataSet"/> instance.</returns>

    public abstract DataSet GetByShowInstalled(TransactionManager transactionManager, int start, int pageLength , System.Boolean? show, System.Boolean? installed);

     

    #endregion

     

    Any help would be appreciated.

    Filed under:
    • Post Points: 35
  • 01-04-2007 11:04 PM In reply to

    • vcif
    • Top 50 Contributor
    • Joined on 06-18-2006
    • Posts 69
    • Points 1,510

    Re: TList not generating

     

    The template will only generate a TList<> if the output of your custom procedure is the same as the columns in the table.(ie matches the CommandSchema and TableSchema in the template code)

    [project_code],[project_description],[show],[installed],[portalid],[moduleid]

    are these all of the columns in the table and are they the ONLY columns in the table? My guess is not which is probably the issue. If not repost and someone smarter will help ;)

    vin

    • Post Points: 35
  • 01-04-2007 11:54 PM In reply to

    Re: TList not generating

    Yes, these are the only columns in the table.
    • Post Points: 35
  • 01-05-2007 3:50 AM In reply to

    • swin
    • Top 10 Contributor
    • Joined on 06-14-2006
    • London, UK
    • Posts 921
    • Points 34,675

    Re: TList not generating

    Can you dump the sql for the Get_List proc on this table. (and also the whole of your custom proc if its not above)

    swin 

     

    -------------------------------------------------
    Member of the .NetTiers team
    -------------------------------------------------
    • Post Points: 35
  • 01-05-2007 9:23 AM In reply to

    Re: TList not generating

    Here is the dump. Note: I removed the @@ROWCOUNT from my custom stored proc based on a post I found in this forum dating back to March 2006 or so. The whole custom is shown above and the GetAll call inside VS2005 does show a TList.

     

    set ANSI_NULLS OFF

    set QUOTED_IDENTIFIER ON

    GO

    /*

    ----------------------------------------------------------------------------------------------------

    -- Date Created: Thursday, January 04, 2007

    -- Created By: ProWeb Internet Group ()

    -- Purpose: Gets all records from the ProWeb_SM_Projects table

    ----------------------------------------------------------------------------------------------------

    */

     

    ALTER PROCEDURE [dbo].[ProWeb_SM_Projects_Get_List]

    AS

     

     

    SELECT

    [project_code],

    [project_description],

    [show],

    [installed],

    [portalid],

    [moduleid]

    FROM

    dbo.[ProWeb_SM_Projects]

     

    Select @@ROWCOUNT

     

     

    Filed under:
    • Post Points: 35
  • 01-06-2007 1:10 PM In reply to

    • vcif
    • Top 50 Contributor
    • Joined on 06-18-2006
    • Posts 69
    • Points 1,510

    Re: TList not generating

    so is it working now that you have removed Select @@ROWCOUNT?

    If not then it must have something to do with how the templates are parsing your tablename with all of the _'s.

    • Post Points: 5
Page 1 of 1 (6 items)
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems