为什么我执行查询可是再dagrid里面不显示数据得呢?
代码如下:
var
id:String;
begin
id:=Edit1.Text;
Query2.Active:=true;
Query2.Close ;
Query2.SQL.Clear;
Query2.SQL.Add('select *from cost');
Query2.SQL.Add('where student_id='''+id+'''');
Query2.Prepare;
Query2.Open; Edit1.Clear;
end;
代码如下:
var
id:String;
begin
id:=Edit1.Text;
Query2.Active:=true;
Query2.Close ;
Query2.SQL.Clear;
Query2.SQL.Add('select *from cost');
Query2.SQL.Add('where student_id='''+id+'''');
Query2.Prepare;
Query2.Open; Edit1.Clear;
end;
解决方案 »
- FastReport中如何同时创建不同数据结果的两份报表?
- delphi 7如何得到系统的显卡内存大小????????
- 关于uml的活动图,请教了,先谢下,呵呵
- 如何用全局热键控制循环体?
- 关于QReport的TQRDBText的折行显示的问题!
- 请问如果用DBcombobox中自动读取数据库某字段
- IdQuotedPrintableDecoder1控件的用法?
- 当本机连上internet时,如何触发执行我的应用程序
- 祝大家新年快乐
- 一个TFORM上有几十个TLabel控件、一个TButton控件,怎样才可以让单击TButton控件时让所有的TLabel控件全部隐藏起来?
- TIDHTTP与IIS用户名、密码
- 95领分(二)...
------------------------------------
体验速度,体验CSDN论坛助手:http://community.csdn.net/Expert/TopicView.asp?id=4700683
Query2.Close ;
Query2.SQL.Clear;
Query2.SQL.Add('select *from cost');
Query2.SQL.Add('where student_id='''+id+'''');
Query2.Open;
应该是可以正常显示的
代码应该没有错
会不会是配置错误
QUERY 的CONNECTIONSTRING 属性呢?