Sqlcommand.deriveparameters failed

Source: Internet
Author: User
The error message is as follows:


Sqlcommand.deriveparameters failed because the Sqlcommand.commandtext property value was an invalid multipart name "Select * FROM TableA ', the current limit of ' 4 ' is insufficient.


Cause of Error:

When using the Enterprise Library for database operations, you must use an overloaded method if you are using SQL statements instead of stored procedures:
_db. ExecuteDataset (CommandType type,string SQL)

Instead of:

Public virtual DataSet ExecuteDataset (String storedprocedurename,params object[] parametervalues)


Details: Click to open the link


or through SQL, get to DbCommand, and then execute:


The ExecuteDataset overload method is as follows:

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)


The above is sqlcommand.deriveparameters failed content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.