Procedure wrapper needs 2nd Resultset?

Discussion in 'ASP General' started by Jonathan Beam, Sep 26, 2003.

  1. I'm trying to create a wrapper procedure. The procedure I'm calling
    returns 2 resultsets. I really only need the second, but I'm not sure
    how to get the second resultset. Is there something like ADO's
    Resultset.NextRecordset for Transaction SQL?


    CREATE PROCEDURE dbo.NAMissionsSearchNameWrapper @Search varchar,
    @SortByName INT
    AS
    CREATE TABLE #NaMissionsSearchNameTemp(
    AccountNumber VARCHAR(12) NOT NULL,
    AccountName VARCHAR(512) NULL,
    Address1 VARCHAR(255) NULL,
    Address2 VARCHAR(255) NULL,
    Address3 VARCHAR(255) NULL,
    Address4 VARCHAR(255) NULL,
    PPL VARCHAR(255) NULL, --city
    ADM2 VARCHAR(255) NULL, --whats this?
    ADM1 VARCHAR(255) NULL, --state
    FIPSCountryCode VARCHAR(50) NULL,
    PostalCode VARCHAR(255) NULL,
    ExportAddressAsIs BIT(2) NULL,
    Name1 VARCHAR(255) NULL,
    Name2 VARCHAR(255) NULL,
    Name3 VARCHAR(255) NULL,
    Name4 VARCHAR(255) NULL,
    LastName VARCHAR(255) NULL,
    FamiliarName VARCHAR(255) NULL,
    Title VARCHAR(255) NULL,
    Suffix VARCHAR(255) NULL,
    FirstName VARCHAR(255) NULL,
    MiddleInitial VARCHAR(255) NULL,
    ProperName VARCHAR(512) NULL,
    GenderDesignation VARCHAR(10) NULL,
    MainframeAddressNumber VARCHAR(10) NULL,
    PostalAddressGUID VARCHAR(50) NULL,
    GUID UNIQUEIDENTIFIER NULL)

    INSERT INTO #NaMissionsSearchNameTemp
    SELECT NA.NARepository.dbo.usp_DP_NARSearchNameAddress
    @@Search,
    @SortByName
    ..
    ..
    ..
     
    Jonathan Beam, Sep 26, 2003
    #1
    1. Advertising

  2. Jonathan Beam

    Ken Schaefer Guest

    Hi,

    If you want to suppress the "XX records affected" resultset, then use SET
    NOCOUNT ON

    Cheers
    Ken

    "Jonathan Beam" <> wrote in message
    news:...
    : I'm trying to create a wrapper procedure. The procedure I'm calling
    : returns 2 resultsets. I really only need the second, but I'm not sure
    : how to get the second resultset. Is there something like ADO's
    : Resultset.NextRecordset for Transaction SQL?
    :
    :
    : CREATE PROCEDURE dbo.NAMissionsSearchNameWrapper @Search varchar,
    : @SortByName INT
    : AS
    : CREATE TABLE #NaMissionsSearchNameTemp(
    : AccountNumber VARCHAR(12) NOT NULL,
    : AccountName VARCHAR(512) NULL,
    : Address1 VARCHAR(255) NULL,
    : Address2 VARCHAR(255) NULL,
    : Address3 VARCHAR(255) NULL,
    : Address4 VARCHAR(255) NULL,
    : PPL VARCHAR(255) NULL, --city
    : ADM2 VARCHAR(255) NULL, --whats this?
    : ADM1 VARCHAR(255) NULL, --state
    : FIPSCountryCode VARCHAR(50) NULL,
    : PostalCode VARCHAR(255) NULL,
    : ExportAddressAsIs BIT(2) NULL,
    : Name1 VARCHAR(255) NULL,
    : Name2 VARCHAR(255) NULL,
    : Name3 VARCHAR(255) NULL,
    : Name4 VARCHAR(255) NULL,
    : LastName VARCHAR(255) NULL,
    : FamiliarName VARCHAR(255) NULL,
    : Title VARCHAR(255) NULL,
    : Suffix VARCHAR(255) NULL,
    : FirstName VARCHAR(255) NULL,
    : MiddleInitial VARCHAR(255) NULL,
    : ProperName VARCHAR(512) NULL,
    : GenderDesignation VARCHAR(10) NULL,
    : MainframeAddressNumber VARCHAR(10) NULL,
    : PostalAddressGUID VARCHAR(50) NULL,
    : GUID UNIQUEIDENTIFIER NULL)
    :
    : INSERT INTO #NaMissionsSearchNameTemp
    : SELECT NA.NARepository.dbo.usp_DP_NARSearchNameAddress
    : @@Search,
    : @SortByName
    : .
    : .
    : .
     
    Ken Schaefer, Sep 27, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matrix
    Replies:
    0
    Views:
    578
    Matrix
    Apr 1, 2004
  2. Mike P
    Replies:
    0
    Views:
    3,307
    Mike P
    Jun 19, 2006
  3. AlexWare
    Replies:
    2
    Views:
    761
    Paul Uiterlinden
    Oct 23, 2009
  4. Ian Pilcher

    Unmodifiable ResultSet wrapper?

    Ian Pilcher, Aug 29, 2011, in forum: Java
    Replies:
    3
    Views:
    719
  5. R.. Kumar 1.9.1 OSX

    RVM macruby install procedure needs improvement

    R.. Kumar 1.9.1 OSX, Aug 20, 2010, in forum: Ruby
    Replies:
    4
    Views:
    169
    R.. Kumar 1.9.1 OSX
    Aug 20, 2010
Loading...

Share This Page