Need help defining auto-incrementing field using TTable.Create 
Author Message
 Need help defining auto-incrementing field using TTable.Create

I am creating a table ( using TTable.Create ) and I want one field to be
auto-incrementing how do I define it using one of the type below?

ftUnknown, ftString, ftSmallint, ftInteger, ftWord, ftBoolean, ftFloat,
ftCurrency, ftBCD, ftDate, ftTime, ftDateTime, ftBytes, ftVarBytes, ftBlob,
ftMemo,
ftGraphic

Any help would be grate.
Sande



Tue, 08 Jun 1999 03:00:00 GMT  
 Need help defining auto-incrementing field using TTable.Create

Sande',

You appear to be using D1.  

D1 doesn't support autoinc in TTable.CreateTable; but it does in a TQuery.
D2 has fixed this omission.

If you don't want to use a TQuery then use ftInteger then perform a
dbiDoRestructure changing the integer field to autoinc.  If it's a once-off
then use Database Desktop.

The lack of decent documentation makes dbiDoRestructure usage a big
headache but it works.  If you are going to use bdiDoRestructure then you
can give CreateTable the flick (if you want).

--
Paul Motyer

Croydon, Australia, 3136



Quote:
> I am creating a table ( using TTable.Create ) and I want one field to be
> auto-incrementing how do I define it using one of the type below?

> ftUnknown, ftString, ftSmallint, ftInteger, ftWord, ftBoolean, ftFloat,
> ftCurrency, ftBCD, ftDate, ftTime, ftDateTime, ftBytes, ftVarBytes,
ftBlob,
> ftMemo,
> ftGraphic

> Any help would be grate.
> Sande



Thu, 10 Jun 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Auto-Increment Fields in Run-Time Created Databases ??

2. Need Help With Auto-Increment Primary Key Errors

3. CREATING AUTO INCREMENT ?

4. Auto increment field

5. Master-detail and auto-increment fields

6. Auto Increment Fields and Master Details Relationship

7. Question about auto increment field

8. MS Access Auto incrementing Key fields

9. Delphi 2 SQL Server 6 problem with identifier (auto-increment) fields

10. Auto-increment fields - Should I Use Them?

11. Obtaining value of Paradox's Auto-Incremented Field Type

12. How to reset auto- increment Fields

 

 
Powered by phpBB® Forum Software