这是我的查询和参数列表,我得到了消息“并非所有变量绑定”
Dim cmd As New OracleCommand("select POLICY_REFER, ....
from POLICY_MASTER
where ISSUE_DATE BETWEEN :DFrom AND :DTo
And (CLIENT_NAME = :client or :client is null)
and (POLICY_PRODUCT = :product or :product is null)
and DOC_STATUS = 'Parked'", sgcnn)
cmd.Parameters.Add("@DFrom", OracleDbType.Date).Value = DtpFrom.Value.ToShortDateString
cmd.Parameters.Add("@DTo", OracleDbType.Date).Value = DtpTo.Value.ToShortDateString
cmd.Parameters.Add("@Product", OracleDbType.Varchar2).Value = CmbProduct.Text
cmd.Parameters.Add("@Client", OracleDbType.Varchar2).Value = CmbClient.Text
如果我在参数列表的查询中只使用了 client_name,那么它可以工作,但是当我使用 client_name 和产品时,我得到了消息“不是所有变量绑定”