HighTechTalks DotNet Forums  

tableadapter configuration fails with stored procedures and temp t

Dotnet Framework (ADO.net) microsoft.public.dotnet.framework.adonet


Discuss tableadapter configuration fails with stored procedures and temp t in the Dotnet Framework (ADO.net) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
MarcG
 
Posts: n/a

Default tableadapter configuration fails with stored procedures and temp t - 11-07-2007 , 10:25 AM






This issue was raised in posts from 2005 to 2007. The Feedback article dated
2005 at ...

https://connect.microsoft.com/Visual...&wa=wsignin1.0

provides a workaround that leaves a maintenance headache. I have experienced
the problem with a stored procedure that creates temporary tables, getting
the message "Invalid object name '#temp1'"

Is this bug/feature still active, or is there something that I can do to get
the adapter and table set up properly by the wizard.

Thx
Marc

Reply With Quote
  #2  
Old   
WenYuan Wang [MSFT]
 
Posts: n/a

Default RE: tableadapter configuration fails with stored procedures and temp t - 11-08-2007 , 03:39 AM






Hello Marc,

Thanks for your posting, but I'm afraid to say this is a Product
Limitation.

Karol has explained it in the feedback. Visual Studio TableAdapter wizard
cannot get information about the schema of temp table in stored procedure.
This is caused by known SQL Server limitation. As far as I know, defining
the schema in typed DataSet Designer seems the only workaround.

I aslo tried it on VS 2008 beta2. I'm sorry to say this limitation is still
active.

We are indeed sorry for any inconvenience this may have caused.
Please feel free to update here again, if there is anything we can help
with.

Have a great day,
Best regards,

Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


Reply With Quote
  #3  
Old   
WenYuan Wang [MSFT]
 
Posts: n/a

Default RE: tableadapter configuration fails with stored procedures and temp t - 11-09-2007 , 03:49 AM



Hello Marc,

This is Wen Yuan again. I found a solution is to use Table Valued
Functions. VS IDE cannot get information of Temp Table, but it works fine
with Table Valued Function. I would like to highly recommend taking a look.

Hope this helps. Please feel free to update here again, if there is
anything unclear or you have more concern.
We are glad to assist you.

Have a great day,
Best regards,

Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


Reply With Quote
  #4  
Old   
damonl73@yahoo.com
 
Posts: n/a

Default Re: tableadapter configuration fails with stored procedures and tempt - 11-15-2007 , 01:31 PM



This works for me. Add these lines to the beginning of your sp:

IF 1=0 BEGIN
SET FMTONLY OFF
END

Obviously that statement is never executed, but for whatever reason it
gets the job done.

On Nov 9, 3:49 am, v-wyw... (AT) online (DOT) microsoft.com (WenYuan Wang [MSFT])
wrote:
Quote:
Hello Marc,

This is Wen Yuan again. I found a solution is to use Table Valued
Functions. VS IDE cannot get information of Temp Table, but it works fine
with Table Valued Function. I would like to highly recommend taking a look.

Hope this helps. Please feel free to update here again, if there is
anything unclear or you have more concern.
We are glad to assist you.

Have a great day,
Best regards,

Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


Reply With Quote
  #5  
Old   
jcohen68@gmail.com
 
Posts: n/a

Default Re: tableadapter configuration fails with stored procedures and tempt - 12-10-2007 , 09:59 AM



On Nov 15, 1:31 pm, damon... (AT) yahoo (DOT) com wrote:
Quote:
This works for me. Add these lines to the beginning of your sp:

IF 1=0 BEGIN
SET FMTONLY OFF
END

Obviously that statement is never executed, but for whatever reason it
gets the job done.

On Nov 9, 3:49 am, v-wyw... (AT) online (DOT) microsoft.com (WenYuan Wang [MSFT])
wrote:



Hello Marc,

This is Wen Yuan again. I found a solution is to use Table Valued
Functions. VS IDE cannot get information of Temp Table, but it works fine
with Table Valued Function. I would like to highly recommend taking a look.

Hope this helps. Please feel free to update here again, if there is
anything unclear or you have more concern.
We are glad to assist you.

Have a great day,
Best regards,

Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.- Hide quoted text -

- Show quoted text -
WOW! That's cool. Thanks! Do we know why this code that is never run
works?

Thanks again


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.