SqlCommand.DeriveParameters failed
错误信息例如以下:
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的更多相关文章
- 浅析ado.net获取数据库元数据信息 DeriveParameters
写这个文章源于早先对ADO.Net获取数据库元数据上的认识,去年我在阅读ADO.Net Core Reference的时候曾经注意过DataSet的FillSchema的这个方法.这方面,在我之前的随 ...
- 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 ...
- [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 ...
- ADO.NET基础知识学习(SQLCOnnection&SQLCommand&SQLDataReader&SQLDataAdapter&DataSet)
通过ADO.NET技术,我们可以高效的完成客户端同数据库之间的数据访问操作,便于我们在客户端程序简便高效的访问以及获取数据库中的有用数据,同时也可以对数据库中的数据进行更新,即可以完成客户端与数据库之 ...
- 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 ... 这个错误是因为有两个相 ...
- Android Studio:Failed to resolve ***
更换电脑后,也更新了所有的SDK的tool,仍然报错:Failed to resolve 各种jar包,出现这种问题主要是因为在Android studio中默认不允许在线更新,修改方法如下:
- PMON failed to acquire latch, see PMON dump
前几天,一台Oracle数据库(Oracle Database 10g Release 10.2.0.4.0 - 64bit Production)监控出现"PMON failed to a ...
- [异常解决] windows用SSH和linux同步文件&linux开启SSH&ssh client 报 algorithm negotiation failed的解决方法之一
1.安装.配置与启动 SSH分客户端openssh-client和openssh-server 如果你只是想登陆别的机器的SSH只需要安装openssh-client(ubuntu有默认安装,如果没有 ...
- 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 ...
随机推荐
- Android常用的一些make命令【转】
本文转载自:http://blog.csdn.net/liuxd3000/article/details/39181377 1.make -jX X表示数字,这个命令将编译Android系统并生成镜 ...
- open Command window here
http://www.sevenforums.com/tutorials/134831-open-command-window-here-add-remove.html 按照教程里面,下载一个脚本 需 ...
- Node.js:路由
ylbtech-Node.js:路由 1.返回顶部 1. Node.js 路由 我们要为路由提供请求的 URL 和其他需要的 GET 及 POST 参数,随后路由需要根据这些数据来执行相应的代码. 因 ...
- 09.ws复杂数据类型数据传输
和ajax的共同点是都是自己组装消息自己解析消息.这种方式的好处是一点都不用生成客户端代码.这两种方式(ajax和HttpUrlConnection)的好处是一点都不用生成客户端代码. WSDL这个文 ...
- 利用阿里云加速Docker For Windows
1.进入阿里云的容器镜像服务,找到镜像中心的镜像加速器. https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors 2.进入Docker ...
- npm run dev 出现警告
WARNING in ./node_modules/_webpack@3.10.0@webpack/buildin/global.js There are multiple modules with ...
- 什么是递归?用十进制转二进制的Python函数示例说明
先上用Python写的十进制转二进制的函数代码: def Dec2Bin(dec): result = '' if dec: result = Dec2Bin(dec//2) return resul ...
- BZOJ 2659 数学
思路: 一开始以为是真·欧几里德 a,b来回消 (其实用不了那么麻烦) 我们发现 这是一个矩形 求一下整点数 完了.. 要特判 p=q的情况 //By SiriusRen #include <c ...
- JavaScript命名空间的理解与实现
命名空间有效防止函数名/类名和其他人的冲突,在使用多个第三方框架或类库的时候,一旦冲突,唯一能作的就是放弃其中一个.从事Web开发不可避免要接触JavaScript,目前最新版本的JavaScript ...
- 装饰模式(Decorator)C++实现
装饰模式 层层包装,增强功能.这就是装饰模式的要旨!装饰器模式就是基于对象组合的方式,可以很灵活的给对象添加所需要的功能.它把需要装饰的功能放在单独的类中,并让这个类包装它所要装饰的对象. 意图: 动 ...