N
noall
Unregistered / Unconfirmed
GUEST, unregistred user!
DLL中是这样的:
procedure Test;stdcall;
var
Database: TDAODatabase;
Table: TDAOTable;
begin
Database := TDAODatabase.Create(nil);
try
Database.Connected :=False;
Database.DatabaseName := 'dbdemos.mdb';
Database.DAOVersion := Dao36;
Database.Open;
Database.Connected :=False;
finally
freeandnil(database);
end;
end;
exports
Test;
调用时这样:
procedure Test; external 'daolib.dll';
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
Test;
end;
一量Test一调用完之后,窗体关闭时就无法退出...
dao用的是2.1版. 在D6下使用..
procedure Test;stdcall;
var
Database: TDAODatabase;
Table: TDAOTable;
begin
Database := TDAODatabase.Create(nil);
try
Database.Connected :=False;
Database.DatabaseName := 'dbdemos.mdb';
Database.DAOVersion := Dao36;
Database.Open;
Database.Connected :=False;
finally
freeandnil(database);
end;
end;
exports
Test;
调用时这样:
procedure Test; external 'daolib.dll';
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
Test;
end;
一量Test一调用完之后,窗体关闭时就无法退出...
dao用的是2.1版. 在D6下使用..