失
失败者
Unregistered / Unconfirmed
GUEST, unregistred user!
unit Unit1
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, DBGrids, FlatCustomControl, FlatPanel, FlatSystem, DataHandle,
TB2Item, TB2Dock, TB2Toolbar, ToolWin, ComCtrls, StdCtrls
type
TForm1 = class(TForm)
FlatSystem1: TFlatSystem
FlatPanel1: TFlatPanel
DBGrid1: TDBGrid
Button1: TButton
procedure Button1Click(Sender: TObject)
procedure FormCreate(Sender: TObject)
private
{ Private declarations }
public
{ Public declarations }
end
var
Form1: TForm1
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject)
//此处DBGrid1就无法正常显示
var
dmDataManage : TdmDataManage
begin
Button1.Caption:='dd'
dmDataManage:=TdmDataManage.Create(Application)
dmDataManage.SetSQL('select * from worker')
DBGrid1.Refresh
end
procedure TForm1.FormCreate(Sender: TObject)
//此处正常
var
dmDataManage : TdmDataManage
begin
Button1.Caption:='dd'
dmDataManage:=TdmDataManage.Create(Application)
dmDataManage.SetSQL('select * from worker')
DBGrid1.Refresh
end
end.
TdmDataManage是一个数据模块,里面有一个ADOQuery和一个DataSouce ,
错误情况是在Onclick中的DBGrid1不进行刷新。但能编译通过,执行时程序也不报导错。
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, DBGrids, FlatCustomControl, FlatPanel, FlatSystem, DataHandle,
TB2Item, TB2Dock, TB2Toolbar, ToolWin, ComCtrls, StdCtrls
type
TForm1 = class(TForm)
FlatSystem1: TFlatSystem
FlatPanel1: TFlatPanel
DBGrid1: TDBGrid
Button1: TButton
procedure Button1Click(Sender: TObject)
procedure FormCreate(Sender: TObject)
private
{ Private declarations }
public
{ Public declarations }
end
var
Form1: TForm1
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject)
//此处DBGrid1就无法正常显示
var
dmDataManage : TdmDataManage
begin
Button1.Caption:='dd'
dmDataManage:=TdmDataManage.Create(Application)
dmDataManage.SetSQL('select * from worker')
DBGrid1.Refresh
end
procedure TForm1.FormCreate(Sender: TObject)
//此处正常
var
dmDataManage : TdmDataManage
begin
Button1.Caption:='dd'
dmDataManage:=TdmDataManage.Create(Application)
dmDataManage.SetSQL('select * from worker')
DBGrid1.Refresh
end
end.
TdmDataManage是一个数据模块,里面有一个ADOQuery和一个DataSouce ,
错误情况是在Onclick中的DBGrid1不进行刷新。但能编译通过,执行时程序也不报导错。