语法错误:'classes'运算符后缺少操作数 [英] Syntax Error: Missing operand after 'classes' operator
本文介绍了语法错误:'classes'运算符后缺少操作数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
private void textBox1_TextChanged(object sender, EventArgs e)
{
DataTable dataSet = new DataTable();
DataView DV = new DataView(dataSet);
DV.RowFilter = string.Format("select * from classes where title LIKE '%{0}%';", textBox1.Text);
dataCursuri.DataSource = DV;
}
我想按列标题过滤数据库表类。
我做了一个文本框,输入的文字将过滤列。
(我使用的数据库是PostgreSQL)
我得到错误说'类'运算符后缺少操作数
我正在寻求帮助,因为我无法弄清楚如何做吧..
谢谢。
I want to filter the database table "classes" by column "title".
I made a textbox and the text entered there will filter the column.
(The database I use is PostgreSQL)
I Get an error saying Missing operand after 'classes' operator
I`m asking for some help ,because I can`t figure out how to do it..
Thank you.
推荐答案
thr语法应该是
thr syntax should be
DV.RowFilter =@"Column1 like '%" + textBox1.Text + "%'" ;
这篇关于语法错误:'classes'运算符后缺少操作数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文