Problems getting the result fields to show up in a Table Adapter

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andrew Cooper

    Problems getting the result fields to show up in a Table Adapter

    Greetings,

    I'm creating a website using ASP.NET. In creating my DAL I've got a
    Table Adapter that I've set up to use an existing Stored Procedure from
    an SQL Server 2000 database. However, when I select the stored
    procedure I want to use the fields that are returned do not show up in
    the listbox for that stored procedure. If I continue and attempt to
    finish the Table Adapter I get the following error (even though the
    Adapter is created)...

    "Generated Select Statement.
    Invalid object name #TempNoPatch."

    Here is the entire stored procedure that I'm attempting to connect to.

    <--- Begin code ---->

    create procedure Monthly_Billing _Report

    @StartDate varchar(10),
    @EndDate varchar(10)

    as

    exec usp_Billing_Rep ort_by_Main @StartDate, @EndDate

    select MainAcctNum, MainAcctName, AutoAttnTime, OperatorTime, PatchTime,
    NumCalls from MonthlyBillingR eport

    <--- End Code --->

    Essentially, it fills a table in the database and then returns that
    table. The #TempNoPatch is a temporary table used in the
    usp_Billing_Rep ort_by_Main procedure. Why is the Adapter getting hung
    up on the temp table in the second procedure? I'm just returned an
    actual table that is defined in the database. You would think it'd know
    what the results would look like from that.

    Thanks,

    Andrew
  • Cor Ligthert[MVP]

    #2
    Re: Problems getting the result fields to show up in a Table Adapter

    Andrew,

    As you show it now it is nowhere an ASP.Net or VB.Net question.

    You show only a part of your transaction SQL code.

    Does that work in the Query analyzer.

    As it there shows a resultset and you have provided the right parameters to
    your DataAdapter, then I don't see why it would not show up, but give us at
    least the code you use to set the parameters plus the dataadapter code, I
    don't believe that anybody can give you real an advise in this based on
    whatg you have showed now. (It can be but that can a child than as well with
    a lucky guess).

    Cor

    "Andrew Cooper" <kairoscreative @gmail.comschre ef in bericht
    news:%23urtofP8 IHA.2064@TK2MSF TNGP02.phx.gbl. ..
    Greetings,
    >
    I'm creating a website using ASP.NET. In creating my DAL I've got a Table
    Adapter that I've set up to use an existing Stored Procedure from an SQL
    Server 2000 database. However, when I select the stored procedure I want
    to use the fields that are returned do not show up in the listbox for that
    stored procedure. If I continue and attempt to finish the Table Adapter I
    get the following error (even though the Adapter is created)...
    >
    "Generated Select Statement.
    Invalid object name #TempNoPatch."
    >
    Here is the entire stored procedure that I'm attempting to connect to.
    >
    <--- Begin code ---->
    >
    create procedure Monthly_Billing _Report
    >
    @StartDate varchar(10),
    @EndDate varchar(10)
    >
    as
    >
    exec usp_Billing_Rep ort_by_Main @StartDate, @EndDate
    >
    select MainAcctNum, MainAcctName, AutoAttnTime, OperatorTime, PatchTime,
    NumCalls from MonthlyBillingR eport
    >
    <--- End Code --->
    >
    Essentially, it fills a table in the database and then returns that table.
    The #TempNoPatch is a temporary table used in the
    usp_Billing_Rep ort_by_Main procedure. Why is the Adapter getting hung up
    on the temp table in the second procedure? I'm just returned an actual
    table that is defined in the database. You would think it'd know what the
    results would look like from that.
    >
    Thanks,
    >
    Andrew

    Comment

    • Andrew Cooper

      #3
      Re: Problems getting the result fields to show up in a Table Adapter

      Cor Ligthert[MVP] wrote:
      Andrew,
      >
      As you show it now it is nowhere an ASP.Net or VB.Net question.
      >
      You show only a part of your transaction SQL code.
      >
      Does that work in the Query analyzer.
      >
      As it there shows a resultset and you have provided the right
      parameters to your DataAdapter, then I don't see why it would not show
      up, but give us at least the code you use to set the parameters plus
      the dataadapter code, I don't believe that anybody can give you real
      an advise in this based on whatg you have showed now. (It can be but
      that can a child than as well with a lucky guess).
      >
      Cor
      >
      "Andrew Cooper" <kairoscreative @gmail.comschre ef in bericht
      news:%23urtofP8 IHA.2064@TK2MSF TNGP02.phx.gbl. ..
      >Greetings,
      >>
      >I'm creating a website using ASP.NET. In creating my DAL I've got a
      >Table Adapter that I've set up to use an existing Stored Procedure
      >from an SQL Server 2000 database. However, when I select the stored
      >procedure I want to use the fields that are returned do not show up
      >in the listbox for that stored procedure. If I continue and attempt
      >to finish the Table Adapter I get the following error (even though
      >the Adapter is created)...
      >>
      >"Generated Select Statement.
      > Invalid object name #TempNoPatch."
      >>
      >Here is the entire stored procedure that I'm attempting to connect to.
      >>
      ><--- Begin code ---->
      >>
      >create procedure Monthly_Billing _Report
      >>
      >@StartDate varchar(10),
      >@EndDate varchar(10)
      >>
      >as
      >>
      >exec usp_Billing_Rep ort_by_Main @StartDate, @EndDate
      >>
      >select MainAcctNum, MainAcctName, AutoAttnTime, OperatorTime,
      >PatchTime, NumCalls from MonthlyBillingR eport
      >>
      ><--- End Code --->
      >>
      >Essentially, it fills a table in the database and then returns that
      >table. The #TempNoPatch is a temporary table used in the
      >usp_Billing_Re port_by_Main procedure. Why is the Adapter getting
      >hung up on the temp table in the second procedure? I'm just returned
      >an actual table that is defined in the database. You would think
      >it'd know what the results would look like from that.
      >>
      >Thanks,
      >>
      >Andrew
      >
      Thanks for the response but I got it worked out.

      Andrew

      Comment

      Working...