Professional Web Applications Themes

Procedure wrapper needs 2nd Resultset? - ASP

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, ...

  1. #1

    Default Procedure wrapper needs 2nd Resultset?

    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_NarchNameAddress
    Search,
    SortByName
    ..
    ..
    ..
    Jonathan Beam Guest

  2. #2

    Default Re: Procedure wrapper needs 2nd Resultset?

    Hi,

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

    Cheers
    Ken

    "Jonathan Beam" <jonathan.beamjuno.com> wrote in message
    news:e8f3347b.0309261311.1a1016d3posting.google.c om...
    : 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_NarchNameAddress
    : Search,
    : SortByName
    : .
    : .
    : .


    Ken Schaefer Guest

Similar Threads

  1. Can not open resultset
    By Rob in forum MySQL
    Replies: 2
    Last Post: May 21st, 07:49 PM
  2. Caching a resultset from a stored procedure
    By zax_srb in forum Coldfusion Database Access
    Replies: 0
    Last Post: January 26th, 03:15 PM
  3. Resultset Comparison
    By alagukannan in forum Coldfusion Database Access
    Replies: 1
    Last Post: December 8th, 07:59 PM
  4. resultset.close()
    By xixi in forum IBM DB2
    Replies: 3
    Last Post: July 14th, 05:04 PM
  5. Stored Procedure not returning the wanted resultset
    By Henning Kongsgaard in forum Microsoft SQL / MS SQL Server
    Replies: 2
    Last Post: July 4th, 08:01 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139