错误信息例如以下:

SqlCommand.DeriveParameters failed because the SqlCommand.CommandText property value is an invalid multipart name "SELECT * from tableA", the current limit of "4" is insufficient。

错误原因:

使用Enterprise Library进行数据库操作时,假设直接使用sql 语句而非存储过程。一定要用重载方法:
_db.ExecuteDataSet(CommandType type,String sql)

而不是:

public virtual DataSet ExecuteDataSet(
string storedProcedureName,
params Object[] parameterValues
)

具体介绍:点击打开链接

或者通过sql,获取到DbCommand,再运行:

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />

ExecuteDataSet重载方法例如以下:

Database.ExecuteDataSet Method (DbCommand)

public virtual DataSet ExecuteDataSet(
DbCommand command
)

Database.ExecuteDataSet Method (CommandType, String)

public virtual DataSet ExecuteDataSet(
CommandType commandType,
string commandText
)

Database.ExecuteDataSet Method (DbCommand, DbTransaction)

public virtual DataSet ExecuteDataSet(
DbCommand command,
DbTransaction transaction
)

Database.ExecuteDataSet Method (String, Object[])

public virtual DataSet ExecuteDataSet(
string storedProcedureName,
params Object[] parameterValues
)

Database.ExecuteDataSet Method (DbTransaction, CommandType, String)

public virtual DataSet ExecuteDataSet(
DbTransaction transaction,
CommandType commandType,
string commandText
)

Database.ExecuteDataSet Method (DbTransaction, String, Object[])

public virtual DataSet ExecuteDataSet(
DbTransaction transaction,
string storedProcedureName,
params Object[] parameterValues
)

SqlCommand.DeriveParameters failed的更多相关文章

  1. 浅析ado.net获取数据库元数据信息 DeriveParameters

    写这个文章源于早先对ADO.Net获取数据库元数据上的认识,去年我在阅读ADO.Net Core Reference的时候曾经注意过DataSet的FillSchema的这个方法.这方面,在我之前的随 ...

  2. Retrieving failed records after an SqlBulkCopy exception

    Let me start by saying that the idea I used in this article is not originally mine, but since I have ...

  3. [springMVC - 1A] - Request processing failed; nested exception is org.apache.ibatis.builder.IncompleteElementException

    一月 14, 2016 1:30:07 下午 org.apache.catalina.core.StandardWrapperValve invoke严重: Servlet.service() for ...

  4. ADO.NET基础知识学习(SQLCOnnection&SQLCommand&SQLDataReader&SQLDataAdapter&DataSet)

    通过ADO.NET技术,我们可以高效的完成客户端同数据库之间的数据访问操作,便于我们在客户端程序简便高效的访问以及获取数据库中的有用数据,同时也可以对数据库中的数据进行更新,即可以完成客户端与数据库之 ...

  5. Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define ...

    Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define ... 这个错误是因为有两个相 ...

  6. Android Studio:Failed to resolve ***

    更换电脑后,也更新了所有的SDK的tool,仍然报错:Failed to resolve  各种jar包,出现这种问题主要是因为在Android studio中默认不允许在线更新,修改方法如下:

  7. PMON failed to acquire latch, see PMON dump

    前几天,一台Oracle数据库(Oracle Database 10g Release 10.2.0.4.0 - 64bit Production)监控出现"PMON failed to a ...

  8. [异常解决] windows用SSH和linux同步文件&linux开启SSH&ssh client 报 algorithm negotiation failed的解决方法之一

    1.安装.配置与启动 SSH分客户端openssh-client和openssh-server 如果你只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有 ...

  9. Failed to stop iptables.service: Unit iptables.service not loaded.

    redhat 7 [root@lk0 ~]# service iptables stop Redirecting to /bin/systemctl stop iptables.service Fai ...

随机推荐

  1. Hexo简介

    Hexo是什么 Hexo(中文官方网站)是一个快速, 简洁且高效的博客框架. 让上百个页面在几秒内瞬间完成渲染. Hexo支持Github Flavored Markdown的所有功能, 甚至可以整合 ...

  2. oc6--类方法

    // // main.m // 第一个OC类-类方法 #import <Foundation/Foundation.h> // 1.编写类的声明 @interface Iphone : N ...

  3. DDos攻击,使用深度学习中 栈式自编码的算法

    转自:http://www.airghc.top/2016/11/10/Dection-DDos/ 最近研究了一篇论文,关于检测DDos攻击,使用了深度学习中 栈式自编码的算法,现在简要介绍一下内容论 ...

  4. 大数据攻城狮之Linux基础------rpm软件管理

    rpm的英文名称为: Redhat package manager 常用的命令加组合: i 安装 rpm -ivh 软件包名 当然我们的rpm也可以支持多包同时操作 rpm -ivh 软件包1 软件包 ...

  5. SwiftUI 官方教程(二)

    SwiftUI 官方教程(二) 2. 自定义 Text View 为了自定义 view 的显示,我们可以自己更改代码,或者使用 inspector 来帮助我们编写代码. 在构建 Landmarks 的 ...

  6. .net core虚拟目录配置

    .net core在iis上配置虚拟目录不起作用,只需要将app.UseStaticFiles中物理路径PhysicalFileProvider改为指定的路径即可,如:E:\\Html\\News a ...

  7. 前后端分离开发,基于SpringMVC符合Restful API风格Maven项目实战(附完整Demo)!

    摘要: 本人在前辈<从MVC到前后端分离(REST-个人也认为是目前比较流行和比较好的方式)>一文的基础上,实现了一个基于Spring的符合REST风格的完整Demo,具有MVC分层结构并 ...

  8. jquery.slides.js

    http://slidesjs.com/#docs 一款强大的,专业的幻灯片组件,全方位对幻灯片的速度..全方位的控制: $(function(){ $("#slides").sl ...

  9. idea下的jsp开发中cannot resolve taglib with uri的解决方法

    写jsp难免会用到<c:foreach>标签,于是我在idea上的jsp顶头写下了 <%@ taglib prefix="c" uri= 'http://java ...

  10. Spring aop(实验写法)

    1. 创建通知:定义一个接口 Public interface Sleepable { voidsleep(); }然后写一个Human类,他实现了这个接口 publicHuman implement ...