SqlCommand.DeriveParameters failed
2023-09-14 09:03:14 时间
SqlCommand.DeriveParameters failed because the SqlCommand.CommandText property value is an invalid multipart name SELECT * from tableA , the current limit of 4 is insufficient。
错误原因:
详细介绍:点击打开链接
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,再执行:
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 )
相关文章
- composer 报错:Failed to decode response: zlib_decode(): data error 解决办法
- 移动MM failed to find resource file{mmiap.xml}
- Centos下apache启动时httpd: apr_sockaddr_info_get() failed for 报错
- pip install mysqlclient报错: error: command ‘gcc‘ failed with exit status 1 OSError: mysql_config no
- The request failed with HTTP status 401: Unauthorized
- 已解决[1964] Failed to execute script ‘VRrify_code’ due to unhandled exception
- Original error was: DLL load failed while importing _multiarray_umath: 找不到指定的模块
- Ubuntu 20.04.3 启动sshd失败,报错:Failed to start OpenBSD Secure Shell server
- ffmpeg udp推流bind failed: Address already in use
- Android:Error:Execution failed for task ‘:app:transformResourcesWithMergeJavaResForDebug‘.
- Execution failed for task ‘:app:processDebugResources‘. > com.android.ide.common.process.ProcessExce
- 解决K8S集群kubelet故障:Failed to update stats for container && nable to determine device info for dir