请教一个关于delphi安装制作的问题 (50分)

  • 主题发起人 主题发起人 小熊跳舞
  • 开始时间 开始时间

小熊跳舞

Unregistered / Unconfirmed
GUEST, unregistred user!
[green]我用delphi6.0+Access2000做了一个小软件!用Inno Setup Compiler安装软件进行了安装制作!在我自己的电脑上试着安装了一下可以运行!但安装到别人的电脑上系统就报错!同志们能不能给我这个新手指点一下!!谢谢!
错误信息为 Exception Estackoverflow in module STAS.exe at 00138030 Stack overflaw
我用的控件是ADO
我听说要安装一些支持Access的动态连接库DLL文件!!无奈我很菜!!请大家帮忙!!谢谢了!![/green]
[:D]我用的是ADO的JET引擎呀!!
 
不需要什么支持access的动态连接库,基本上所有的操作系统都有.
你在网上随便下载一个安装程序工具就可以了.我估计是你的安装软件有问题.
 
用什么数据引擎
如果是ADO的JET引擎只需程序文件与数据库等文件就行了
如果是ODBC是需要配置数据源
如果是BDE的就要安装BDE引擎
从你的出错信息来看好象不是数据引擎的问题
将文件拷入别人的电脑看一下能否运行
排除一下安装的问题
 
[green][/green]能不能推荐一个简单易用的安装软件!!!最好能有教程!!谢谢帮助!!!
 
d6 的installshield
 
setup factory 相当经典,也不难操作
 
wise 也不错
 
如果对方电脑是Win98第一版或更早则要安装ADO2.1或ADO2.5、2.6、2.7
MS上面有下载
 
忘了跟大家说了!!
在WINDOWS2000下,安装在别人的机子上系统报错为:WINDOW创建了错误程序,须重新启动后在运行!!!但初始的封面能显示出来!!!
在WINDOWXP下,初始的封面显示出来后,就消失了!!也没有报错信息!!!
请各位兄弟姐妹帮帮忙!!必有重谢!!!
 
[red]我在装了Ddelphi 的机子上试了一下,也不行这是怎么会事吗??
在WIN98下,安装在别人的机子上系统报错为:该程序执行了非法操作,即将关闭,如有问题请与程序供应商联系!!
在WINDOWS2000下,安装在别人的机子上系统报错为:WINDOW创建了错误程序,须重新启动后在运行!!!但初始的封面能显示出来!!!
在WINDOWXP下,初始的封面显示出来后,就消失了!!也没有报错信息!!![/red]
是不是我做的程序有问题呀??我把源码贴出来给大家看看,帮帮忙吧!!!
所用控件:Delphi自带+XPMENU +DevExpresExpressQuantumGriPrv3.2.Suit for Delphi
源码如下:
[blue]unit main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, XPMenu, ExtCtrls, ToolWin, ComCtrls, StdCtrls, DBCtrls, Spin,
dxExEdtr, dxEdLib, dxDBELib, dxCntner, dxEditor, dxTL, dxDBCtrl, dxDBGrid,
Buttons, Menus, dxDBTLCl, dxGrClms, DB, ADODB;
type
TSaveMethod = procedure (const FileName: String;
ASaveAll: Boolean) of object;
TFrm_main = class(TForm)
XPMenu1: TXPMenu;
ControlBar1: TControlBar;
ToolBar1: TToolBar;
ToolButton2: TToolButton;
ToolButton5: TToolButton;
ToolButton7: TToolButton;
Panel1: TPanel;
GroupBox4: TGroupBox;
Label3: TLabel;
Label5: TLabel;
Label2: TLabel;
GroupBox1: TGroupBox;
DBRadioGroup8: TDBRadioGroup;
GroupBox3: TGroupBox;
Label4: TLabel;
Label7: TLabel;
DBRadioGroup1: TDBRadioGroup;
DBRadioGroup2: TDBRadioGroup;
Panel2: TPanel;
DBRadioGroup3: TDBRadioGroup;
DBRadioGroup5: TDBRadioGroup;
DBRadioGroup7: TDBRadioGroup;
DBRadioGroup6: TDBRadioGroup;
dxSpin_week: TdxDBSpinEdit;
dxSpin_sn: TdxDBSpinEdit;
dxSpin_group: TdxDBSpinEdit;
dxSpin_distance: TdxDBSpinEdit;
dxEditStyleController1: TdxEditStyleController;
Label1: TLabel;
Panel3: TPanel;
DBNavigator1: TDBNavigator;
Panel4: TPanel;
StatusBar1: TStatusBar;
dxDBGrid1: TdxDBGrid;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
BitBtn4: TBitBtn;
BitBtn5: TBitBtn;
BitBtn6: TBitBtn;
ToolBar2: TToolBar;
ADOConnection1: TADOConnection;
ADOTable1: TADOTable;
DataSource1: TDataSource;
dxDBGrid1ID: TdxDBGridMaskColumn;
dxDBGrid1Week: TdxDBGridColumn;
dxDBGrid1Date: TdxDBGridDateColumn;
dxDBGrid1Time: TdxDBGridColumn;
dxDBGrid1SN: TdxDBGridColumn;
dxDBGrid1Group: TdxDBGridColumn;
dxDBGrid1Distance: TdxDBGridColumn;
dxDBGrid1Intensity: TdxDBGridColumn;
dxDBGrid1Mode: TdxDBGridColumn;
dxDBGrid1Equipment: TdxDBGridColumn;
dxDBGrid1Timeload: TdxDBGridColumn;
dxDBGrid1Swimpool: TdxDBGridColumn;
dxDBGrid1Description: TdxDBGridMemoColumn;
dxDBMemo1: TdxDBMemo;
dxDBDateEdit1: TdxDBDateEdit;
dxDBGrid1Amount: TdxDBGridColumn;
SaveDialog: TSaveDialog;
cbSaveAll: TdxCheckEdit;
BitBtn7: TBitBtn;
BitBtn8: TBitBtn;
BitBtn9: TBitBtn;
BitBtn10: TBitBtn;
BitBtn11: TBitBtn;
ToolBar3: TToolBar;
ToolButton1: TToolButton;
ToolButton3: TToolButton;
ToolButton4: TToolButton;
ToolButton6: TToolButton;
ToolButton8: TToolButton;
ToolButton9: TToolButton;
MainMenu1: TMainMenu;
files: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
A1: TMenuItem;
N6: TMenuItem;
P1: TMenuItem;
V1: TMenuItem;
N7: TMenuItem;
X1: TMenuItem;
database: TMenuItem;
N9: TMenuItem;
N10: TMenuItem;
X2: TMenuItem;
Y1: TMenuItem;
Z1: TMenuItem;
N11: TMenuItem;
Excel1: TMenuItem;
HTLM1: TMenuItem;
statistics: TMenuItem;
N13: TMenuItem;
S1: TMenuItem;
plan: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
N17: TMenuItem;
information: TMenuItem;
N19: TMenuItem;
help: TMenuItem;
N21: TMenuItem;
procedure FormCreate(Sender: TObject);
procedure ToolButton8Click(Sender: TObject);
procedure BitBtn4Click(Sender: TObject);
procedure BitBtn6Click(Sender: TObject);
procedure BitBtn3Click(Sender: TObject);
procedure BitBtn5Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure ADOTable1AfterDelete(DataSet: TDataSet);
procedure ADOTable1AfterPost(DataSet: TDataSet);
procedure BitBtn7Click(Sender: TObject);
private
procedure Save(ADefaultExt, AFilter, AFileName: String;
AMethod: TSaveMethod);
public
{ Public declarations }
end;

var
Frm_main: TFrm_main;
implementation
uses sta;
{$R *.dfm}
procedure TFrm_main.FormCreate(Sender: TObject);
begin
Frm_main.Height:=680;
Frm_main.Width:=880;
Frm_main.Position:=poScreencenter;
Frm_main.AutoSize:=True;
SaveDialog.InitialDir := ExtractFilePath(Application.ExeName);
end;
procedure TFrm_main.Save(ADefaultExt, AFilter, AFileName: String;
AMethod: TSaveMethod);
begin
with SaveDialogdo
begin
DefaultExt := ADefaultExt;
Filter := AFilter;
FileName := AFileName;
if Execute then
AMethod(FileName, cbSaveAll.Checked);
end;
end;
procedure TFrm_main.ToolButton8Click(Sender: TObject);
begin
Frm_sta.Show;
end;


procedure TFrm_main.BitBtn4Click(Sender: TObject);
begin
ADOTable1.Cancel;
end;

procedure TFrm_main.BitBtn6Click(Sender: TObject);
begin
ADOTable1.Delete;
end;

procedure TFrm_main.BitBtn3Click(Sender: TObject);
begin
ADOTable1.Open;
ADOTable1.Active:=True;
ADOTable1.Edit;
ADOTable1.FieldByName('Amount').AsInteger:=dxSpin_group.IntValue*dxSpin_distance.IntValue;
ADOTable1.Post;
ADOTable1.Refresh;
ADOTable1.Active:=False;
ADOTable1.Close;
BitBtn3.Enabled:=False;
BitBtn4.Enabled:=False;
BitBtn5.Enabled:=True;
BitBtn6.Enabled:=True;
end;

procedure TFrm_main.BitBtn5Click(Sender: TObject);
begin
BitBtn5.Enabled:=False;
BitBtn6.Enabled:=False;
BitBtn3.Enabled:=True;
BitBtn4.Enabled:=True;
begin
ADOTable1.Open;
ADOTable1.Active:=True;
ADOTable1.Append;
end;

end;


procedure TFrm_main.BitBtn1Click(Sender: TObject);
begin
Save('xls', 'Microsoft Excel 4.0 Worksheet (*.xls)|*.xls', 'ExpGrid.xls', dxDBGrid1.SaveToXLS);
end;

procedure TFrm_main.BitBtn2Click(Sender: TObject);
begin
Save('htm', 'HTML File (*.htm;
*.html)|*.htm', 'ExpGrid.htm', dxDBGrid1.SaveToHTML);
end;

procedure TFrm_main.ADOTable1AfterDelete(DataSet: TDataSet);
begin
Frm_main.StatusBar1.SimpleText:=Format('有%d条记录',[DataSet.RecordCount]);
end;

procedure TFrm_main.ADOTable1AfterPost(DataSet: TDataSet);
begin
Frm_main.StatusBar1.SimpleText:=Format('有%d条记录',[DataSet.RecordCount]);
end;

procedure TFrm_main.BitBtn7Click(Sender: TObject);
begin
Frm_sta.Show;
end;
[/blue]
unit sta;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, XPMenu, StdCtrls, dxCntner, dxTL, dxDBCtrl, dxDBGrid,
DB, ADODB, dxDBTLCl, dxGrClms;
type
TFrm_sta = class(TForm)
PageControl1: TPageControl;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
TabSheet3: TTabSheet;
TabSheet4: TTabSheet;
TabSheet5: TTabSheet;
TabSheet6: TTabSheet;
TabSheet7: TTabSheet;
XPMenu1: TXPMenu;
GroupBox1: TGroupBox;
Btn_in_s: TButton;
Btn_in_r: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton;
GroupBox2: TGroupBox;
dxDBGrid1: TdxDBGrid;
GroupBox3: TGroupBox;
GroupBox4: TGroupBox;
Btn_e_s: TButton;
GroupBox5: TGroupBox;
GroupBox6: TGroupBox;
GroupBox7: TGroupBox;
GroupBox8: TGroupBox;
GroupBox9: TGroupBox;
GroupBox10: TGroupBox;
GroupBox11: TGroupBox;
GroupBox12: TGroupBox;
GroupBox13: TGroupBox;
GroupBox14: TGroupBox;
Btn_e_r: TButton;
Button9: TButton;
Button10: TButton;
Button11: TButton;
Button12: TButton;
Btn_s_s: TButton;
Btn_s_r: TButton;
Button15: TButton;
Button16: TButton;
Button17: TButton;
Button18: TButton;
Btn_t_s: TButton;
Btn_t_r: TButton;
Button21: TButton;
Button22: TButton;
Button23: TButton;
Button24: TButton;
Btn_p_s: TButton;
Btn_p_r: TButton;
Button27: TButton;
Button28: TButton;
Button29: TButton;
Button30: TButton;
Btn_d_s: TButton;
Btn_d_r: TButton;
Button33: TButton;
Button34: TButton;
Button35: TButton;
Button36: TButton;
Btn_m_s: TButton;
Btn_m_r: TButton;
Button39: TButton;
Button40: TButton;
Button41: TButton;
Button42: TButton;
dxDBGrid2: TdxDBGrid;
dxDBGrid3: TdxDBGrid;
dxDBGrid4: TdxDBGrid;
dxDBGrid5: TdxDBGrid;
dxDBGrid6: TdxDBGrid;
dxDBGrid7: TdxDBGrid;
ADQry_intensity: TADOQuery;
DS_intensity: TDataSource;
ADOConnection1: TADOConnection;
ADQry_equipment: TADOQuery;
DS_equipment: TDataSource;
dxDBGrid1week: TdxDBGridColumn;
dxDBGrid1date: TdxDBGridDateColumn;
dxDBGrid1time: TdxDBGridColumn;
dxDBGrid1Expr1003: TdxDBGridColumn;
dxDBGrid1intensity: TdxDBGridColumn;
dxDBGrid2week: TdxDBGridColumn;
dxDBGrid2date: TdxDBGridDateColumn;
dxDBGrid2time: TdxDBGridColumn;
dxDBGrid2Expr1003: TdxDBGridColumn;
dxDBGrid2equipment: TdxDBGridColumn;
DS_stroke: TDataSource;
ADQry_stroke: TADOQuery;
dxDBGrid3week: TdxDBGridColumn;
dxDBGrid3date: TdxDBGridDateColumn;
dxDBGrid3time: TdxDBGridColumn;
dxDBGrid3Expr1003: TdxDBGridColumn;
dxDBGrid3stroke: TdxDBGridColumn;
ADQry_time: TADOQuery;
DS_timeload: TDataSource;
dxDBGrid4week: TdxDBGridColumn;
dxDBGrid4date: TdxDBGridDateColumn;
dxDBGrid4time: TdxDBGridColumn;
dxDBGrid4Expr1003: TdxDBGridColumn;
dxDBGrid4timeload: TdxDBGridColumn;
DS_swimpool: TDataSource;
ADQry_swimpool: TADOQuery;
dxDBGrid5week: TdxDBGridColumn;
dxDBGrid5date: TdxDBGridDateColumn;
dxDBGrid5time: TdxDBGridColumn;
dxDBGrid5Expr1003: TdxDBGridColumn;
dxDBGrid5swimpool: TdxDBGridColumn;
ADQry_date: TADOQuery;
DS_date: TDataSource;
dxDBGrid6week: TdxDBGridColumn;
dxDBGrid6date: TdxDBGridDateColumn;
dxDBGrid6time: TdxDBGridColumn;
dxDBGrid6Expr1003: TdxDBGridColumn;
DS_mode: TDataSource;
ADQry_mode: TADOQuery;
dxDBGrid7week: TdxDBGridColumn;
dxDBGrid7date: TdxDBGridDateColumn;
dxDBGrid7time: TdxDBGridColumn;
dxDBGrid7Expr1003: TdxDBGridColumn;
dxDBGrid7mode: TdxDBGridColumn;
procedure Btn_in_sClick(Sender: TObject);
procedure Btn_in_rClick(Sender: TObject);
procedure Btn_e_sClick(Sender: TObject);
procedure Btn_e_rClick(Sender: TObject);
procedure Btn_s_sClick(Sender: TObject);
procedure Btn_s_rClick(Sender: TObject);
procedure Btn_t_sClick(Sender: TObject);
procedure Btn_t_rClick(Sender: TObject);
procedure Btn_p_sClick(Sender: TObject);
procedure Btn_p_rClick(Sender: TObject);
procedure Btn_d_sClick(Sender: TObject);
procedure Btn_d_rClick(Sender: TObject);
procedure Btn_m_sClick(Sender: TObject);
procedure Btn_m_rClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Frm_sta: TFrm_sta;
implementation
{$R *.dfm}
procedure TFrm_sta.Btn_in_sClick(Sender: TObject);
begin
ADQry_intensity.Active:=True;
Frm_sta.Btn_in_s.Enabled:=False;
end;

procedure TFrm_sta.Btn_in_rClick(Sender: TObject);
begin
ADQry_intensity.Active:=False;
Frm_sta.Btn_in_s.Enabled:=True;
end;

procedure TFrm_sta.Btn_e_sClick(Sender: TObject);
begin
ADQry_equipment.Active:=True;
Btn_e_s.Enabled:=False;
end;

procedure TFrm_sta.Btn_e_rClick(Sender: TObject);
begin
ADQry_equipment.Active:=False;
Btn_e_s.Enabled:=True;
end;

procedure TFrm_sta.Btn_s_sClick(Sender: TObject);
begin
ADQry_stroke.Active:=True;
Btn_s_s.Enabled:=False;
end;

procedure TFrm_sta.Btn_s_rClick(Sender: TObject);
begin
ADQry_stroke.Active:=False;
Btn_s_s.Enabled:=False;
end;

procedure TFrm_sta.Btn_t_sClick(Sender: TObject);
begin
ADQry_time.Active:=True;
Btn_t_s.Enabled:=False;
end;

procedure TFrm_sta.Btn_t_rClick(Sender: TObject);
begin
ADQry_time.Active:=False;
Btn_t_s.Enabled:=True;
end;

procedure TFrm_sta.Btn_p_sClick(Sender: TObject);
begin
ADQry_swimpool.Active:=True;
Btn_p_s.Enabled:=False;
end;

procedure TFrm_sta.Btn_p_rClick(Sender: TObject);
begin
ADQry_swimpool.Active:=False;
Btn_p_s.Enabled:=True;
end;

procedure TFrm_sta.Btn_d_sClick(Sender: TObject);
begin
ADQry_date.Active:=True;
Btn_d_s.Enabled:=False;
end;

procedure TFrm_sta.Btn_d_rClick(Sender: TObject);
begin
ADQry_date.Active:=False;
Btn_d_s.Enabled:=True;
end;

procedure TFrm_sta.Btn_m_sClick(Sender: TObject);
begin
ADQry_mode.Active:=True;
Btn_m_s.Enabled:=False;
end;

procedure TFrm_sta.Btn_m_rClick(Sender: TObject);
begin
ADQry_mode.Active:=False;
Btn_m_s.Enabled:=True;
end;

end.

program STAS;
uses
Forms,
main in 'main.pas' {Frm_main},
Splashform in 'Splashform.pas' {Splash},
sta in 'sta.pas' {Frm_sta};

{$R *.res}
begin
Application.Initialize;
Splash:=TSplash.Create(Application);
Splash.Show;
Splash.Update;
Application.Title := '简易统计系统';
Application.CreateForm(TFrm_main, Frm_main);
Application.CreateForm(TFrm_sta, Frm_sta);
Splash.Hide;
Splash.Free;
Application.Run;
end.
 
如果能帮我解决问题,我相赠100分!!!
 
我觉得,ADO 与 安装程序制作软件 都没问题
应该是你的程序有问题,
从你的 源代码 看不出什么毛病。没有*.dfm文件不能调试
Application.CreateForm(TFrm_main, Frm_main);
Application.CreateForm(TFrm_sta, Frm_sta);
建议:在程序里除了主窗体外,其他窗体,最好在用到时再创建显示用完就释放。
不要在工程文件中以 Application.CreateForm 创建,
 
谢谢kezhiyong,的建议!
但我不知道应该如何在程序里除了主窗体外其他窗体,最好在用到时再创建显示用完就释放。
同时不要在工程文件中以 Application.CreateForm 创建!!
你能不能举一个例子告诉我!!
我是个新手!对Delphi编程还不太熟!!非常感谢!!!
 
谢谢大家的真诚帮助!!!
我已经解决了问题!!!
再次感谢大家!!!
 
begin
Application.Initialize;
Splash:=TSplash.Create(Application);
Splash.Show;
Splash.Update;
Application.Title := '简易统计系统';
Application.CreateForm(TFrm_main, Frm_main);//此行保留(创建主窗体)
Application.CreateForm(TFrm_sta, Frm_sta);//此行去掉(非主窗口)
Splash.Hide;
Splash.Free;
Application.Run;
end.
//////////////////////
procedure TFrm_main.BitBtn7Click(Sender: TObject);
begin
Frm_sta:=TFrm_sta.Create(self);//创建窗体
Frm_sta.Show;//显示窗体
end;
 
to kezhiyong
谢谢你的帮助!我已经解决了问题!!
你告诉我的方法VERY GOOD!
但你能不能告诉我为什么
在程序里除了主窗体外,其他窗体,最好在用到时再创建显示用完就释放。
不要在工程文件中以 Application.CreateForm 创建,
这样有什么好处吗???谢谢!!
 
后退
顶部