I need to write a small console application to process some data in the back ground. This will be called by NT scheduler.
I would like to use data base components (non visual e.g. TTable) I think I should be able to use them but I do not know how to instantiate them in Delphi 5 in a Console app.
Thanks in advance for any replies.
Frank
Have you tried
Table := TTable.Create(nil);
Finn Tolderlund
Put the table components in a datamodule. In your code make sure that you
manually create the datamodule (ie MyDataModule := TMyDateModule.Create...)
and also destroy it once you're finished with it.
ie.
program Foo;
...
use dmMyDataModule;
...
begin
try
MyDataModule := TMyDateModule.Create( NIL );
<do stuff with the datamodule / components on it>
finally
FreeAndNIL( MyDataModule );
end; {try}
end.
Nick