ado+access 出错!(50分)

  • 主题发起人 主题发起人 nmfx1122
  • 开始时间 开始时间
N

nmfx1122

Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TfrmMain.FormCreate(Sender: TObject);
begin
Fxinifiles:=tinifile.Create(extractfilepath(application.exename)+'fxcg.ini');
fdir:=fxinifiles.readString('数据库路径','选取路径','路径');
showmessage ('路径'+fdir);
dm.dml.ADOTable1.Active:=false;
dm.dml.ADOTable1.ConnectionString:='Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:/dhshcgb/database/hsh_cgb.mdb;Persist Security Info=False';

//DML.ADOTable1.ConnectionString:='Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+fdir+';Persist Security Info=False';
//dml.ADOTable1.Connection;
//DML.ADOTable1.TableName:='cshb';
end;
错误信息:
project fxcg.exe raised exception class EAccessVilolation with message 'Access violation at address 005f2B7 in module 'fxcg.exe'.read of address 00000058'.process stopped.use Step or Run to continue.
 
试试:

在project->options
DM要先于frmMain创建
 
十分感谢
现把分加给你。
 
后退
顶部