Default values for a field
Posted: Mon 23 Mar 2009 14:56
hello to all
I have a field in a table let us say for argument sake it is an integer field
PAGENUMBER INTEGER DEFAULT 0 NOT NULL
When I insert a record and do not put a value there I get an error message
the field PAGENUMBER needs a value (Which defies the purpose of a default doesnt it?)
The dataset component
a) is not smart enough to provide a value ?? which is strange
b) I need to set up a special something which I overlooked
I just do a SELECT * FROM at run time no special fields definitions
to get around it I have to create an AfterInsert event and shove there the defaults which is less than optimal
Any Ideas on that guys ?
thanks
PW
I have a field in a table let us say for argument sake it is an integer field
PAGENUMBER INTEGER DEFAULT 0 NOT NULL
When I insert a record and do not put a value there I get an error message
the field PAGENUMBER needs a value (Which defies the purpose of a default doesnt it?)
The dataset component
a) is not smart enough to provide a value ?? which is strange
b) I need to set up a special something which I overlooked
I just do a SELECT * FROM at run time no special fields definitions
to get around it I have to create an AfterInsert event and shove there the defaults which is less than optimal
Any Ideas on that guys ?
thanks
PW