A
austinjian
Unregistered / Unconfirmed
GUEST, unregistred user!
小弟新学的IntraWeb编程,现在只是从书上做个简单的例子,可是一直运行不了.请哪位大家帮看下哪里有问题
unit IWUnit1;
{PUBDIST}
interface
uses
IWAppForm, IWApplication, IWTypes, IWCompRectangle, Classes, Controls,
IWControl, IWCompText, FrameLegt, Forms, Frame, IWGrids, IWDBGrids,
IWCompButton, IWCompEdit, IWCompLabel;
type
TformMain = class(TIWAppForm)
FrameTop1: TFrameTop;
Frameleft1: TFrameleft;
IWDBGrid1: TIWDBGrid;
IWLabel1: TIWLabel;
LbUser: TIWLabel;
IWLabel3: TIWLabel;
EdYear: TIWEdit;
IWLabel4: TIWLabel;
EdMonth: TIWEdit;
IWButton1: TIWButton;
procedure Frameleft1IWLink1Click(Sender: TObject);
procedure IWAppFormCreate(Sender: TObject);
procedure IWButton1Click(Sender: TObject);
public
end;
implementation
{$R *.dfm}
uses
ServerController, utJJ, DatamoduleUnit;
procedure TformMain.Frameleft1IWLink1Click(Sender: TObject);
begin
Release;
TformJJ.Create(WebApplication).Show;
end;
procedure TformMain.IWAppFormCreate(Sender: TObject);
begin
with TPCPSession(WebApplication.Data) do begin
lbUser.Caption:=Name;
end;
end;
procedure TformMain.IWButton1Click(Sender: TObject);
begin
with Datamodule1 do
begin
DataMast.Active:=False;
DataMast.CommandText:='Select * from EmpMess where UserName like '''+lbUser.Caption+'''';
DataMast.Open;
end;//就这个简单的查询就出错.. 搞了两天没搞出来
end;
end.
unit IWUnit1;
{PUBDIST}
interface
uses
IWAppForm, IWApplication, IWTypes, IWCompRectangle, Classes, Controls,
IWControl, IWCompText, FrameLegt, Forms, Frame, IWGrids, IWDBGrids,
IWCompButton, IWCompEdit, IWCompLabel;
type
TformMain = class(TIWAppForm)
FrameTop1: TFrameTop;
Frameleft1: TFrameleft;
IWDBGrid1: TIWDBGrid;
IWLabel1: TIWLabel;
LbUser: TIWLabel;
IWLabel3: TIWLabel;
EdYear: TIWEdit;
IWLabel4: TIWLabel;
EdMonth: TIWEdit;
IWButton1: TIWButton;
procedure Frameleft1IWLink1Click(Sender: TObject);
procedure IWAppFormCreate(Sender: TObject);
procedure IWButton1Click(Sender: TObject);
public
end;
implementation
{$R *.dfm}
uses
ServerController, utJJ, DatamoduleUnit;
procedure TformMain.Frameleft1IWLink1Click(Sender: TObject);
begin
Release;
TformJJ.Create(WebApplication).Show;
end;
procedure TformMain.IWAppFormCreate(Sender: TObject);
begin
with TPCPSession(WebApplication.Data) do begin
lbUser.Caption:=Name;
end;
end;
procedure TformMain.IWButton1Click(Sender: TObject);
begin
with Datamodule1 do
begin
DataMast.Active:=False;
DataMast.CommandText:='Select * from EmpMess where UserName like '''+lbUser.Caption+'''';
DataMast.Open;
end;//就这个简单的查询就出错.. 搞了两天没搞出来
end;
end.