Delphi 2 SQL Server 6 problem with identifier (auto-increment) fields 
Author Message
 Delphi 2 SQL Server 6 problem with identifier (auto-increment) fields

Has anyone experienced a problem using SQL Server identifier fields
with Delphi.  Because these fields are naturally defined as "not null"
delphi seems to require that data be entered into them on an insert.
But this defeats the whole purpose of auto-incrementation where the
data value is generated internally by the DBMS.  Is there a simple way
around this problem?

Thanks.



Wed, 03 Feb 1999 03:00:00 GMT  
 Delphi 2 SQL Server 6 problem with identifier (auto-increment) fields

Quote:

>Has anyone experienced a problem using SQL Server identifier fields
>with Delphi.  Because these fields are naturally defined as "not null"
>Delphi seems to require that data be entered into them on an insert.
>But this defeats the whole purpose of auto-incrementation where the
>data value is generated internally by the DBMS.  Is there a simple way
>around this problem?

I forgot to mention that I am using ODBC for the connection to MS SQL
Server 6.0.
Quote:
>Thanks.



Wed, 03 Feb 1999 03:00:00 GMT  
 Delphi 2 SQL Server 6 problem with identifier (auto-increment) fields

Quote:

> Has anyone experienced a problem using SQL Server identifier fields
> with Delphi.  Because these fields are naturally defined as "not null"
> Delphi seems to require that data be entered into them on an insert.
> But this defeats the whole purpose of auto-incrementation where the
> data value is generated internally by the DBMS.  Is there a simple way
> around this problem?

> Thanks.Set the required property for your Tfield to false.  

a) double-click the table component
b) Click on the Add Button
c) Click on the OK Button
d) Choose the Identity fiedd
e) the property editor should reflect your choice
f) On the property editor, toggle the required property to false


Thu, 04 Feb 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Auto-increment field in MS SQL-Server 6.x and DBGrid

2. Auto increment field

3. Master-detail and auto-increment fields

4. Need help defining auto-incrementing field using TTable.Create

5. Auto Increment Fields and Master Details Relationship

6. Question about auto increment field

7. MS Access Auto incrementing Key fields

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

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

10. How to reset auto- increment Fields

11. Auto-increment fields

12. Delphi3-auto-increment fields

 

 
Powered by phpBB® Forum Software