难道这条简单的SQL语句有错吗? 想进行模糊查询用了这样一条语句AdoDs1.commandtext:='select * from school where schoolID like "'+edit1.text+'"';明明数据库中有记录,但就是显示记录为0。郁闷!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 try this:AdoDs1.commandtext:='select * from school where schoolID like "%'+edit1.text+'%"'; 模糊查询条件:select * from table where condition like '%??%'得带百分号!(SQL下,ACCESS下是*) select * from table where condition like '+''''+'%'+edit1.text+'%'+''''; 哥们。SQL写错了吧改成这样看看AdoDs1.commandtext:='select * from school where schoolID like '''+edit1.text+''''; AdoDs1.commandtext:='select * from school where schoolID like ''%'+edit1.text+'%'''; delphi #转义字符 井号 DateTimePicker 控件 的问题,希望高手来解答。 大家帮忙看看,我该换公司吗? 求教:截取屏幕问题 ★★一个表中的记录有树形层次关系,有没有控件可以在一个表格中显示记录及层次关系,来者有分★★ 郁闷,老是写文档,十分难受,放分 打包时需要将哪些文件打进去?在线等待 TTreeview的递归问题!? 谁能做出象‘蚂蚁’那样的TreeView控件!高分:180,Up一下也有分啊! 程序员能做到三十吗? 如何知道两个时间点的相差多少秒(TDatetime相关) 今天我开始学习编程,明年就赶上你。
AdoDs1.commandtext:='select * from school where schoolID like "%'+edit1.text+'%"';
得带百分号!(SQL下,ACCESS下是*)
改成这样看看AdoDs1.commandtext:='select * from school where schoolID like '''+edit1.text+'''';