By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,536 Members | 1,800 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,536 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Jul 28 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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" <ka************@gmail.comschreef in bericht
news:%2****************@TK2MSFTNGP02.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_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
Jul 29 '08 #2

P: n/a
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" <ka************@gmail.comschreef in bericht
news:%2****************@TK2MSFTNGP02.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_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
Thanks for the response but I got it worked out.

Andrew
Jul 29 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.