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 ...
随机推荐
- Windows 平台下 Go 语言的安装和环境变量设置
1. Go 语言 SDK 安装包下载和安装 最新稳定版 1.5.3 安装包 go1.5.3.windows-amd64.msi下载地址 https://golang.org/dl/,大小约 69 MB ...
- python spark 求解最大 最小 平均
rdd = sc.parallelizeDoubles(testData); Now we’ll calculate the mean of our dataset. 1 LOGGER.info( ...
- xss 记录cookie
<p> <img src="http://act.ci123.com/global/ueditor_new/php/upload/98591403834900.jpg&qu ...
- 基于Apache Thrift的公路涵洞数据交互实现原理
基于Apache Thrift的公路涵洞数据交互实现原理 Apache Thrift简介 Apache Thrift(以下简称为“Thrift”) 是 Facebook 实现的一种高效的.支持多种编程 ...
- 修改数组数据头和尾push()、pop()和unshift()、shift()
1.push().pop()和unshift().shift() 这两组同为对数组的操作,并且会改变数组的本身的长度及内容. 不同的是 push().pop() 是从数组的尾部进行增减,unshift ...
- BZOJ2134: 单选错位(期望乱搞)
Time Limit: 10 Sec Memory Limit: 259 MBSubmit: 1101 Solved: 851[Submit][Status][Discuss] Descripti ...
- javascript中变量命名冲突的问题
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 使用PyQT编写界面程序
使用PyQT比QT好在,可以随时监测函数正确性,省去编译时间 ! 这是个不小的节省. 1. PyQt: 打开对话框 msgbox = QtGui.QMessageBox(self)# 我的语句是 ms ...
- 【前端分享】jQuery.lazyload详解(转)
jQuery实现图片延迟加载,不知道是否可以节省带宽呢?有人知道吗?这究竟只是一个视觉特效还是真的能延迟加载减少服务器的请求呢? <script type="text/javascri ...
- linux笔记常用命令
LINUX成长日记 1.本人工作实例:(将一台服务器的数据库复制到另外一台服务器上) scp -r -P 8351 /bak_mysql/sz_b2b2c201705180200.sql root@1 ...