How do I configure a sqlDataAdapter to use the results of a temporary table from a stored procedure?
I also want to produce a strongly typed dataset from the sqlDataAdapter. The VS wizard states "Invalid object name '#MyTempTable'" The table mappings is empty.
Solution:
1)VS has only a limited ability to retrieve tabular Metadata from stored procedures, and as you have discovered, temp tables are beyond those limits. You should have a dummy table or view in your database which has the same structure as your temp table. In essence this "publishes" the temp table Metadata to the world and lets you easily build strongly-typed datasets from it.
2)you can create the schema directly with the schema tool.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。