32 |
|
uses |
33 |
|
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, |
34 |
|
DbCtrls, StdCtrls, db, DBControlGrid, IBArrayGrid, IBDatabase, |
35 |
< |
IBCustomDataSet, IB; |
35 |
> |
IBCustomDataSet, IB, Types; |
36 |
|
|
37 |
|
{$DEFINE LOCALDATABASE} |
38 |
|
|
39 |
|
const |
40 |
|
sDatabaseName = '1Dtest.fdb'; {If LOCALDATABASE defined then prepended with |
41 |
< |
path to temp folder} |
41 |
> |
path to user data folder} |
42 |
|
|
43 |
|
{If you want to explicitly define the test database location then undefine |
44 |
|
LOCALDATABASE and set explicit path e.g. |
214 |
|
|
215 |
|
procedure TForm1.FormCreate(Sender: TObject); |
216 |
|
begin |
217 |
< |
{$IFDEF LOCALDATABASE} |
218 |
< |
IBDatabase1.DatabaseName := GetTempDir + sDatabaseName |
219 |
< |
{$else} |
217 |
> |
{$IFNDEF LOCALDATABASE} |
218 |
|
IBDatabase1.DatabaseName := sDatabaseName |
219 |
|
{$ENDIF} |
220 |
|
end; |