Z
zgwxldw
Unregistered / Unconfirmed
GUEST, unregistred user!
MDI窗口的数据库
program Project1;
uses
windows,
Forms,
Unit1 in 'Unit1.pas' {Form1},
Unit3 in 'Unit3.pas' {Form3},
Unit4 in 'Unit4.pas' {sj: TDataModule},
Unit2 in 'Unit2.pas' {Form2},
Unit5 in 'Unit5.pas' {Form5},
Unit6 in 'Unit6.pas' {Form6},
Unit7 in 'Unit7.pas' {Form7},
Unit8 in 'Unit8.pas' {Form8},
Unit9 in 'Unit9.pas' {Form9},
Unit10 in 'Unit10.pas' {Form10};
{$R *.res}
begin
Application.Initialize;
Form9:= TForm9.Create(Application);//显示LOGO
Form9.Show;
Form9.Update;
sleep(1000);
Form9.Gauge1.MaxValue:=5;
Form9.Gauge1.Progress:=1 ;
Form8:=TForm8.Create(Application); //登录窗体,
Form9.Gauge1.Progress:=Form9.Gauge1.Progress+1;
Application.Title := '112233';
Form9.Gauge1.Progress:=Form9.Gauge1.Progress+1;
Application.CreateForm(TForm1, Form1);//fsMDIForm
Form9.Gauge1.Progress:=Form9.Gauge1.Progress+1;
Application.CreateForm(Tsj, sj);
Form9.Gauge1.Progress:=Form9.Gauge1.Progress+1;
Form9.Hide;
Form9.Free;
Form8.ShowModal;
Application.Run;
end.
在FORM1 主窗体中加入数据库路径就出错!而加在procedure TForm1.FormShow(Sender: TObject);里就不出错???代码一样??请教大家了
procedure TForm1.FormCreate(Sender: TObject);
begin
sj.con1.ConnectionString:='Provider=Microsoft.Jet.OLEDB.4.0;'
+'Data Source='+'Database/db1.mdb'+';'
+'Persist Security Info=False;'
+'Jet OLEDBatabase Password="123456";';//出错!!!!
end;
program Project1;
uses
windows,
Forms,
Unit1 in 'Unit1.pas' {Form1},
Unit3 in 'Unit3.pas' {Form3},
Unit4 in 'Unit4.pas' {sj: TDataModule},
Unit2 in 'Unit2.pas' {Form2},
Unit5 in 'Unit5.pas' {Form5},
Unit6 in 'Unit6.pas' {Form6},
Unit7 in 'Unit7.pas' {Form7},
Unit8 in 'Unit8.pas' {Form8},
Unit9 in 'Unit9.pas' {Form9},
Unit10 in 'Unit10.pas' {Form10};
{$R *.res}
begin
Application.Initialize;
Form9:= TForm9.Create(Application);//显示LOGO
Form9.Show;
Form9.Update;
sleep(1000);
Form9.Gauge1.MaxValue:=5;
Form9.Gauge1.Progress:=1 ;
Form8:=TForm8.Create(Application); //登录窗体,
Form9.Gauge1.Progress:=Form9.Gauge1.Progress+1;
Application.Title := '112233';
Form9.Gauge1.Progress:=Form9.Gauge1.Progress+1;
Application.CreateForm(TForm1, Form1);//fsMDIForm
Form9.Gauge1.Progress:=Form9.Gauge1.Progress+1;
Application.CreateForm(Tsj, sj);
Form9.Gauge1.Progress:=Form9.Gauge1.Progress+1;
Form9.Hide;
Form9.Free;
Form8.ShowModal;
Application.Run;
end.
在FORM1 主窗体中加入数据库路径就出错!而加在procedure TForm1.FormShow(Sender: TObject);里就不出错???代码一样??请教大家了
procedure TForm1.FormCreate(Sender: TObject);
begin
sj.con1.ConnectionString:='Provider=Microsoft.Jet.OLEDB.4.0;'
+'Data Source='+'Database/db1.mdb'+';'
+'Persist Security Info=False;'
+'Jet OLEDBatabase Password="123456";';//出错!!!!
end;