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

A

Andrew Cooper

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_Report_by_Main @StartDate, @EndDate

select MainAcctNum, MainAcctName, AutoAttnTime, OperatorTime, PatchTime,
NumCalls from MonthlyBillingReport

<--- 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_Report_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
 
C

Cor Ligthert[MVP]

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
 
A

Andrew Cooper

Cor said:
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
Thanks for the response but I got it worked out.

Andrew
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top