Board index » delphi » Does std Delphi3 allows creating tables ?

Does std Delphi3 allows creating tables ?

I've just got the standard version of Delphi 3 I installed on my computer.
But I'm not able to create a database and also tables for my applications.
Must I do it with another database manager or must I purchase the
professional version of D3 ?

Help me !

Domus Lawrence

 

Re:Does std Delphi3 allows creating tables ?


Quote
>>I've just got the standard version of Delphi 3 I installed on my computer.
>>But I'm not able to create a database and also tables for my applications.

The simplest method is to use the Database Desktop (Goto Delphi->Tools->Database Desktop

===
Bill

Re:Does std Delphi3 allows creating tables ?


Hi,
if you want to do it in your program take a TQuery and do the following:
(example)

with Query1 do begin
   with SQL do begin
   Clear;
   Add('CREATE TABLE "MYDB.DB" ' );
   Add('(Nr SMALLINT, ' ) ;
   Add('Counter AUTOINC,' ) ;
   Add('Name CHARACTER(25), ' );
   ADD('PRIMARY KEY(Nr, Counter)) '  ) ;
ExecSQL;
   Clear;
   Add('CREATE INDEX ByName ON "MYDB.DB" (Name, Counter) ' );
ExecSQL;
   end;
end;
---------------------------------------------------------
- Counter ia an autoincrement field
- Primary key is to build the primary index
- Create Index ... is to build a secondary index

Albert

Quote
domus wrote:
> I've just got the standard version of Delphi 3 I installed on my computer.
> But I'm not able to create a database and also tables for my applications.
> Must I do it with another database manager or must I purchase the
> professional version of D3 ?

> Help me !

> Domus Lawrence

Other Threads