home *** CD-ROM | disk | FTP | other *** search
- unit UFile;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- Tempunit, ComCtrls, StdCtrls, Buttons, OleCtrls, CELLLib_TLB, ExtCtrls;
-
- type
- TFFile = class(TTemplate)
- BitBtn2: TBitBtn;
- BitBtn3: TBitBtn;
- procedure BitBtn2Click(Sender: TObject);
- procedure BitBtn3Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- FFile: TFFile;
-
- implementation
-
- {$R *.DFM}
-
- procedure TFFile.BitBtn2Click(Sender: TObject);
- Var
- TablesNames : OleVariant;
- a, b : OleVariant;
- begin
- inherited;
- try
- { if cell1.DoOpenFileDbase(1, ExtractFileDir(Application.ExeName)+'Sample.mdb', TablesNames) = true then
- }
- if cell1.DoOpenFileDbase(0, ExtractFileDir(Application.ExeName)+'\Sample.mdb', TablesNames) = true then
- begin
- ;
- cell1.DoDumpDbaseTable('sample',0, 0, 0, true, a, b);
- ;
- end else
- begin
- MessageDlg('Open file failure, please check file Sample.mdb.', mtInformation,[mbOk], 0);
- end;
- except
- MessageDlg('Open file failure, please check file Sample.mdb.', mtInformation,[mbOk], 0);
- end;
- end;
-
- procedure TFFile.BitBtn3Click(Sender: TObject);
- begin
- inherited;
- ;
- MessageDlg('This function need ODBC support.', mtInformation,[mbOk], 0);
- ;
- end;
-
- end.
-