Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 11 of 11 total
Thread double entries
Sat, Aug 16 2008 5:32 AMPermanent Link

"Frans van Daalen"

"Norbert Stellberg" <Stellberg@Stellberg.de> wrote in message
news:2896ECA8-980A-48F1-ACC5-71B799809FD0@news.elevatesoft.com...
> Hello,
>
>> Why do you first call DBTable1.Edit before the DBTable.Insert ?
>
> I meanit is required , otherwise it comes an errormessage: Table is not in
> Edit mode. Isn't it ?
>
It will only give that message if you try to edit the table and the table
state is not dsedit. quote from the help

"Call Edit to permit editing of the active record in a dataset. Edit
determines the current state of the dataset. If the dataset is empty, Edit
calls Insert. Otherwise Edit"

Note the word active record.

Quote from the help file on .insert

"Call Insert to:

1 Open a new, empty record in the dataset.
2 Set the active record to the new record."


Also a small remark about the following line

> DataSource1.DataSet.FieldByName('Losnr').AsString := '1234';

Why not just

DBTable1.FieldByName('Losnr').AsString := '1234';

Makes it beter to read and understand.

Frans





« Previous PagePage 2 of 2
Jump to Page:  1 2
Image