CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Location
    Sri Lanka
    Posts
    64

    Temp Table In MSSQL Server 2000 And ADO

    Dear All,

    I have a problem with Temp Table and ADO. I use MSSQL Server 2000 and ADO 2.6 with Visual Basic 6.0

    1. --> I Create Stored Procedure as follows


    CREATE PROCEDURE sp_GetData()
    AS
    CREATE TABLE #T1(ItemCode char(15) NOT NULL PRIMARY KEY,
    QTY_RSVD bigint,
    QTY_AVBL bigint)


    -- I INSERT SOME DATA FROM Various Tables to Table #T1


    SELECT * FROM #T1

    GO

    -- END OF STORED PROCEDURE


    2. --> Try to open above stored procedure with ADO, IT was not successfull



    I need to know Is It possible to get the out put of the stored procedure to a ado recordset?

    If it is possible please help me to do It.


    Thank you,

    Dinesh
    --
    web : http://www.freewebs.com/dineshns

  2. #2
    Join Date
    Apr 2003
    Location
    Athens, Greece
    Posts
    1,094

    Re: Temp Table In MSSQL Server 2000 And ADO

    I think you need to set at the start of your stored proc:
    Code:
    SET NOCOUNT ON
    SET ANSI_WARNINGS OFF
    And then at the end, after your SELECT from the temp table
    Code:
    SET NOCOUNT OFF
    SET ANSI_WARNINGS ON
    It works for me then.
    Extreme situations require extreme measures

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured