Board index » delphi » Newbie question - Sybase autoincrement fields in delphi...

Newbie question - Sybase autoincrement fields in delphi...

A newbie question:

Have developed a Sybase table with surrogate key (Id#) of type Integer
with advanced property set to "autoincrement".  However, if I construct
a simple form with a DB Grid  and insert a new record, enter data into
all non-key fields and attempt to post, I get error indicating BDE error
nonblank value expected (I'm not allowing NULL fields) - but what is the
reason I do not get the placement of an autoincrementing integer in the
field?

Regards,

DMLambert

 

Re:Newbie question - Sybase autoincrement fields in delphi...


David,

The error is being reported not by the Sybase engine, but by the BDE.
You need to make sure that the TIntegerField for the primary key has
it's Required property set to FALSE.

HTH - Mike

Quote
David Lambert wrote:

> A newbie question:

> Have developed a Sybase table with surrogate key (Id#) of type Integer
> with advanced property set to "autoincrement".  However, if I construct
> a simple form with a DB Grid  and insert a new record, enter data into
> all non-key fields and attempt to post, I get error indicating BDE error
> nonblank value expected (I'm not allowing NULL fields) - but what is the
> reason I do not get the placement of an autoincrementing integer in the
> field?

> Regards,

> DMLambert

Other Threads