【发布时间】:2014-09-29 12:43:29
【问题描述】:
我正在编写一个代码,该代码将使用 zone-rate-customer_number 格式过滤帐号。例如 125-12-35,其中 125 是区域,12 是费率,35 是客户编号。在我的搜索文本框中,我想输入区域和客户编号,这将排除费率。这是我的代码
Dim search As String = txtsearch.Text
Dim sql As String = "SELECT * FROM tblCustomer WHERE [account no] LIKE '%' + @search + '%'"
Dim cmd As OleDbCommand = New OleDbCommand()
cmd.Connection = Con
cmd.CommandType = CommandType.Text
cmd.CommandText = sql
cmd.Parameters.AddWithValue("[account no]", search)
我怎样才能仅使用区域和客户编号在我的表格中进行搜索?
【问题讨论】: