use.sql.add('where type = edit1.text');
改为:
use.sql.add('where type = ''' + edit1.text + '''');—————————————————————————————————
MaximStr := '宠辱不惊,看庭前花开花落,去留无意;
毁誉由人,望天上云卷云舒,聚散任风。';
if Not Assigned(I) then
I := TI.Create(Nil);
I.Maxim := MaximStr;
I.Explain := '假如上述代码中出现“OA”、“3D”等字样,改为“=”或者去掉';
I.Desire := '加不加分随你';
—————————————————————————————————
改为:
use.sql.add('where type = ''' + edit1.text + '''');—————————————————————————————————
MaximStr := '宠辱不惊,看庭前花开花落,去留无意;
毁誉由人,望天上云卷云舒,聚散任风。';
if Not Assigned(I) then
I := TI.Create(Nil);
I.Maxim := MaximStr;
I.Explain := '假如上述代码中出现“OA”、“3D”等字样,改为“=”或者去掉';
I.Desire := '加不加分随你';
—————————————————————————————————
解决方案 »
- 请问哪里还可以买到罗小平的《delphi精要》吗?或者哪位仁兄不需要了转让一本。谢谢!
- 我想更好更快地学习delphi7,请兄弟们支招。
- 关闭程序时,有时报错
- 请教关于是否按下大写键的提示
- 高手来帮帮我啊,关于动态数组的赋值
- stringgrid的颜色显示?
- [-----指纹开发------]用Delphi进行指纹开发~~
- 问大家一个问题?
- 为什么我的delphi5进去后只剩代码编辑器,其它菜单工具条等都没有了,用kv3000正版杀毒没发现病毒。
- 那里可以下载delphi6?
- 紧急请教:程序运行时,出现错误:DCOMConection控件的commandtext不允许改变是则那么回事
- 请问哪位用Delphi 做过mail 和 传真 系统的?一定给我点建议,谢谢!急!
MaximStr := '宠辱不惊,看庭前花开花落,去留无意;
毁誉由人,望天上云卷云舒,聚散任风。';
if Not Assigned(I) then
I := TI.Create(Nil);
I.Maxim := MaximStr;
I.Explain := '假如上述代码中出现“OA”、“3D”等字样,改为“=”或者去掉';
I.Desire := '加不加分随你';
—————————————————————————————————
为什么'where type = edit1.text'等号左右要有空格??????????
begin
with use do
begin
close;
use.sql.clear;
use.sql.add('select * from type');
//改为
use.sql.add('where type = '+''''+edit1.text+'''');
use.open;
end;end;
为什么还要 use.sql.clear;
use.sql.add('where type = '+''''+edit1.text+'''');中的type是字段名吗?
即使with do也需要2加query名字的,我也不知道为什么,d6就不会
是的
我表名和字段名都使用了type,对不起,一时偷懒
use.sql.add('where type = '+''''+edit1.text+'''');
可改为use.sql.add('select type from type');
use.sql.add('where type = '+edit1.text);
你可以试一试!