首页 > 其他分享 >以含临时表的存储过程创建类型化数据集时报错

以含临时表的存储过程创建类型化数据集时报错

时间:2023-11-08 10:02:07浏览次数:36  
标签:存储 以含 temp typed create stored table 类型化 schema

I've been struggling for the past couple months to use the Visual Studio XSD tool to create typed datasets from my stored procedures.  But I always get an error telling me the temp table is an invalid object name.  I've just discovered that temp tables are actually not allowed in this tool, due to the way it writes the schema to XML (see this article and this article for details).  There are a couple things about typed datasets that would make my life MUCH easier, so I'm still hoping there's a workaround for this...  Does anyone know how to create a typed dataset using a stored procedure that creates a temp table?  One of the articles I linked to mentions using the SET FMTONLY ON within the stored procedure, but when we tried that we either got NO results or a SQL exception. 
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.



标签:存储,以含,temp,typed,create,stored,table,类型化,schema
From: https://blog.51cto.com/emanlee/8245276

相关文章

  • 最佳的文件存储方式
    最佳的文件存储方式你们是如何既保证文件的安全性,有能在多平台互通的呢?我用过有道云笔记、飞书、钉钉、语雀等文件工具。但是在19年的某一天,我再也不相信平台了,因为有道云笔记把我所有的笔记丢失了。叫天天不应叫地地不灵,那可是我一年多的笔记呀下面我一一讲一下我的使用感受......
  • 视频集中存储EasyCVR平台播放一段时间后出现黑屏是什么原因?该如何解决?
    安防视频监控/视频集中存储/云存储/磁盘阵列EasyCVR平台可拓展性强、视频能力灵活、部署轻快,可支持的主流标准协议有国标GB28181、RTSP/Onvif、RTMP等,以及支持厂家私有协议与SDK接入,包括海康Ehome、海大宇等设备的SDK等。平台既具备传统安防视频监控的能力,也具备接入AI智能分析的能......
  • 视频集中存储EasyCVR平台播放一段时间后出现黑屏是什么原因?该如何解决?
    安防视频监控/视频集中存储/云存储/磁盘阵列EasyCVR平台可拓展性强、视频能力灵活、部署轻快,可支持的主流标准协议有国标GB28181、RTSP/Onvif、RTMP等,以及支持厂家私有协议与SDK接入,包括海康Ehome、海大宇等设备的SDK等。平台既具备传统安防视频监控的能力,也具备接入AI智能分析的......
  • 云存储/视频监控管理平台EasyCVR,使用sqlite数据库出现卡顿该如何优化?
    视频集中存储/云存储/视频监控管理平台EasyCVR能在复杂的网络环境中,将分散的各类视频资源进行统一汇聚、整合、集中管理,实现视频资源的鉴权管理、按需调阅、全网分发、智能分析等。AI智能大数据视频分析EasyCVR平台已经广泛应用在工地、工厂、园区、楼宇、校园、仓储等场景中。有用......
  • 在树莓派上部署 NFS 文件存储服务器
    有时候我们在需要在自己的电脑与树莓派或树莓派与树莓派之间进行文件共享、传输。网络文件系统(NetworkFileSystem)应运而生,NFS是由SUN公司研制的UNIX表示层协议(Presentationlayerprotocol),可以让使用者访问网络上别处的文件就像在使用自己的计算机一样。NFS的搭建过程也......
  • mysql测试语句创建写入存储过程调用8.0
    --创建表格 CREATETABLEmy_table(idINTAUTO_INCREMENT,nameVARCHAR(255)CHARACTERSETutf8mb4COLLATEutf8mb4_0900_ai_ci,emailVARCHAR(255)CHARACTERSETutf8mb4COLLATEutf8mb4_0900_ai_ci,passwordVARCHAR(255)CHARACTERSETutf8mb4COLL......
  • oss对象存储使用记录
    上传:#!/bin/bash#dockerserver01/root/ossutil64cp/opt/dockercn01/activity/oss://gstarcad-logs/cn-gactivity/01/--include"catalina.out*.gz"-r-u下载:#!/bin/bashecho-e"\033[31mPleaseinputsystemname\033[0m"echo-e&quo......
  • HDFS Balancer存储水位稳定性原理与实践
    1.背景在HDFS分布式系统中,经常会上线新的datanode以环境集群容量不足的问题。但是往往旧datanode水位较高,甚至爆满无法写入,新datanode非常空闲,导致旧机器无法写入数据,集群的流量集中到新datanode中,造成新datanode网络延迟。为了解决上述问题,可以通过Balancer工具定时讲高水位dat......
  • HF Hub 现已加入存储区域功能
    我们在企业版Hub服务方案中推出了存储区域(StorageRegions)功能。通过此功能,用户能够自主决定其组织的模型和数据集的存储地点,这带来两大显著优势,接下来的内容会进行简要介绍:法规和数据合规,此外还能增强数字主权性能提升(下载和上传速度更快,减少延迟)目前,我们支持以下几......
  • 【躬行】-深度缓冲和模板缓冲是怎么存储的?
    概述最近在工作中需要实现一个功能,用到了模板测试。但奇怪的是,模板测试竟然不起作用!在解决问题的过程中,发现了一些有趣的知识点。通过本文,可以了解在unity中,深度缓冲和模板缓冲到底是怎么存储的。测试环境的搭建Unity版本:2021.3.16f1URP版本:12.1.8RenderDoc:1.29需要注意的是......