Board index » delphi » I want help please !!!

I want help please !!!

My name is Nuno and I'm talking from Portugal. I've started programming in
Delphi5 one month ago. I'de like some help about creating tables with the
Delphi code; not in design time but in runtime. I know the code (more or
less) but I have some errors that I cannot correct. I'd like some one to
help me about some code tricks to allow me to make the code without this
errors (for example: unsatisfied forward or external
declaration:'tform3.createtable'
thanks

Nuno  E-mail: npgr...@hotmail.com

 

Re:I want help please !!!


First all, bad luck with the football.

The unsatisfied ... error you have is because Delphi thinks that
the CreateTable command is a Procedure you have defined. By the
looks of it you are calling it from TForm.CreateTable which you
don't need to do. Anyway here is some code modified from a TI

var
  MyTable: TTable;
begin
  MyTable := TTable.Create(Self);

  with MyTable do
  begin
    { put a alias here or leave blank for current dir}
    DatabaseName := '';
    {the name of your table}
    TableName := 'Test.DB';

    {add any field you may have}
    with FieldDefs do
    begin
      Add('ItemsTotal', ftCurrency, 0, false);
      FieldDefs[0].CreateField(MyTable);
      Add('TaxRate', ftFloat, 0, false);
      FieldDefs[1].CreateField(MyTable);
      TFloatField(Fields[1]).DisplayFormat := '##.0%';

    end;
    MyTable.CreateTable;
  end;

There are a lot of good sites around for you to search.

First of all start at
http://community.borland.com
Search the FAQ's and Ti's
then try
www.torry.ru
www.delphipages.com
www.delphi3000.com
www.delphi32.com
as well as the Delphi Super Page.

Good Luck and Happy Coding.

Cheers

Jim

-----------------------------------------------------------

Got questions?  Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com

Other Threads