为什么我键入的数据集不像临时表那样? [英] Why does my typed dataset not like temporary tables?

本文介绍了为什么我键入的数据集不像临时表那样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将tableadapter添加到SQL Server 2005 Express中的存储过程.但是,该存储过程使用名为#temp的临时表.创建表适配器时,Visual Studio会抱怨未知对象'#temp'",并说存储过程返回0列.这是有问题的,因为我将存储过程与Crystal报表一起使用,并且需要这些列.

I am attempting add a tableadapter to a stored procedure in my SQL Server 2005 Express. The stored procedure, however, uses a temporary table called #temp. When creating the table adapter, Visual Studio complains "Unknown Object '#temp'" and says that the stored procedure returns 0 columns. This is problematic because I use that stored procedure with a crystal report, and need those columns.

我该如何解决?

推荐答案

Bizarre.根据您添加

Bizarre. According to this you add

IF 1=0 BEGIN
    SET FMTONLY OFF
END

在SP的AS部分之后直接

到SP,它可以工作. Visual Studio现在没有问题了.我不知道为什么这样会如此,或者为什么会这样,但是确实如此.

to the SP right after the AS part of the SP and it works. Visual Studio now has no problem with it. I have no idea why this works like this, or why it would work, but it does.

这篇关于为什么我键入的数据集不像临时表那样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆