Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread DBSYS 4.26b1 Record Adding Problem
Wed, Feb 20 2008 9:23 AMPermanent Link

Frederick Chin
Hi,

I am using DBSYS 4.26b1 and there is a problem with the table not
setting the AutoInc field to a value when a new record is manually
added by pressing the Down Arrow key.

The table structure contains two fields; record (Autoinc) and name
(String, 10).

After creating the table, open it and press the Down Arrow key to
insert a new record. The value for record is blank. Press the Up Arrow
key to save the record and the record is not created.

I tried the same procedure with DBSYS 3.30 and the record field
contains a value of 0 initially and after pressing the Up Arrow key, a
value of 1 is set for the record field and a new record is created.

What is happening with DBSYS 4.26b1?

Thanks.
Wed, Feb 20 2008 4:10 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Frederick,

<< After creating the table, open it and press the Down Arrow key to insert
a new record. The value for record is blank. Press the Up Arrow key to save
the record and the record is not created. >>

This is standard TDataSet behavior - if no fields are modified, then the
record is not considered modified and the insert is effectively cancelled.
You have to modify at least one field to get around this.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Feb 20 2008 8:12 PMPermanent Link

Frederick Chin
Tim.

>This is standard TDataSet behavior - if no fields are modified, then the
>record is not considered modified and the insert is effectively cancelled.
>You have to modify at least one field to get around this.

That is true but I set the field for NAME to a default value of say
"FRED". When I press the down arrow, "FRED" appears and I would expect
DBISAM to recognize that the field has been modified with a value and
create a record when I press the up arrow key.

In a table where I have 10 string fields with each set to a default
value and 1 field is an Autoinc, issuing a TTable.Append and
positioning the cursor to a TDBEdit linked to one of the string fields
will render the control to go blank instead of the default value
shown.

I am currently working around it by having to set a value for the
field that already has a default value defined.
Thu, Feb 21 2008 1:02 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Frederick,

<< That is true but I set the field for NAME to a default value of say
"FRED". When I press the down arrow, "FRED" appears and I would expect
DBISAM to recognize that the field has been modified with a value and create
a record when I press the up arrow key. >>

DBISAM does not consider default field values to be "modifications".

--
Tim Young
Elevate Software
www.elevatesoft.com

Image