Subject | Re: [IBO] PreparedEdits does not work as expected? |
---|---|
Author | Helen Borrie |
Post date | 2003-02-21T07:03:53Z |
At 05:27 AM 21/02/2003 +0000, you wrote:
I think Svein's interpretation is right.
The default behaviour by the BDE was to hold a prepared statement that
updates every field in the dataset, regardless of how many fields were
changed. You can have that behaviour by setting PreparedEdits
false. IBO's default behaviour is PreparedEdits true, whereby no
"UpdateAll" prepared statement is created; instead, at posting time, IBO
constructs a DSQL statement that updates only the fields that have changed.
Here's the help text for the PreparedEdits property
This property determines whether all updates are performed through a
prepared DSQL statement or whether a DSQL statement for just the updated
columns should be constructed and immediately executed (the default).
This is saying that the statement is immediately executed, not that it is
being submitted with a called to ExecuteImmediate.
As you rightly observe, ExecuteDML encapsulates a call to one of the
ExecuteImmediate functions - two special-case calls that don't do a prepare
before submitting the statement.
FUpdateSQL.EditSQL uses a regular statement that goes through the normal
cycle of preparing (if necessary) and executing via a call to Execute.
Helen
>Dear Svein,Michael,
>
>I am sorry I cannot agree with you. The Help text is very clear. If
>peparedEdits is false, the statement should be executed without
>prepare, by doing something like the ExecuteDML method. I still
>suspect this feature is not implemented.
I think Svein's interpretation is right.
The default behaviour by the BDE was to hold a prepared statement that
updates every field in the dataset, regardless of how many fields were
changed. You can have that behaviour by setting PreparedEdits
false. IBO's default behaviour is PreparedEdits true, whereby no
"UpdateAll" prepared statement is created; instead, at posting time, IBO
constructs a DSQL statement that updates only the fields that have changed.
Here's the help text for the PreparedEdits property
This property determines whether all updates are performed through a
prepared DSQL statement or whether a DSQL statement for just the updated
columns should be constructed and immediately executed (the default).
This is saying that the statement is immediately executed, not that it is
being submitted with a called to ExecuteImmediate.
As you rightly observe, ExecuteDML encapsulates a call to one of the
ExecuteImmediate functions - two special-case calls that don't do a prepare
before submitting the statement.
FUpdateSQL.EditSQL uses a regular statement that goes through the normal
cycle of preparing (if necessary) and executing via a call to Execute.
Helen