Subject | Bug or Newbie issue: DataSetProvider not updating properly |
---|---|
Author | rlong99 |
Post date | 2003-08-25T20:29:23Z |
I do not know whether this is a bug in IBO or because I am so new
using IBO (acutally evaulating) that I am doing something wrong. I
am connecting a TIBOQuery to a TDataSetProvider to a TClientDataSet.
1. Open the TClientDataSet
2. TClientDataSet.Edit and change the key value from XXX to WWW
3. TClientDataSet.Post and TClientDataSet.ApplyUpdates(0)
Problem: The DataSetProvider creates the following statement seem via
TIB_Monitor:
UPDATE SALESPERSON
SET SALESPERSON_ID = ? /* SALESPERSON_ID */
, NAME = ? /* NAME */
, ISACTIVE = ? /* ISACTIVE */
, GROUP_ID = ? /* GROUP_ID */
, COMMISSION = ? /* COMMISSION */
WHERE SALESPERSON.SALESPERSON_ID = ? /* OLD.SALESPERSON_ID */
PARAMS = [ Version 1 SQLd 6 SQLn 6
[SALESPERSON_ID] = 'XXX'
[NAME] = 'Test Customer2'
[ISACTIVE] = 'Y'
[GROUP_ID] = 'YYY'
[COMMISSION] = 0.15
OLD.[SALESPERSON_ID] = 'XXX' ]
Update suceeds, fails to process correctly, because the SALESPERSON_ID
should be WWW instead of XXX, so SALESPERSON_ID has not changed. The
only way that I can make this work is to change the following:
TIBOQuery.RequestLive = True;
TIBOQuery.Unidirectional = False;
TDataSetProvider.ResolveToDataSet := True;
But if I do this, I am using both the TIBOQuery and TClientDataSet to
cache data (due to Unidirectional), so I know this can't be the
correct procedure. Please Help.
I am using D7, Interbase 6.01 OS, IBO 4.2
using IBO (acutally evaulating) that I am doing something wrong. I
am connecting a TIBOQuery to a TDataSetProvider to a TClientDataSet.
1. Open the TClientDataSet
2. TClientDataSet.Edit and change the key value from XXX to WWW
3. TClientDataSet.Post and TClientDataSet.ApplyUpdates(0)
Problem: The DataSetProvider creates the following statement seem via
TIB_Monitor:
UPDATE SALESPERSON
SET SALESPERSON_ID = ? /* SALESPERSON_ID */
, NAME = ? /* NAME */
, ISACTIVE = ? /* ISACTIVE */
, GROUP_ID = ? /* GROUP_ID */
, COMMISSION = ? /* COMMISSION */
WHERE SALESPERSON.SALESPERSON_ID = ? /* OLD.SALESPERSON_ID */
PARAMS = [ Version 1 SQLd 6 SQLn 6
[SALESPERSON_ID] = 'XXX'
[NAME] = 'Test Customer2'
[ISACTIVE] = 'Y'
[GROUP_ID] = 'YYY'
[COMMISSION] = 0.15
OLD.[SALESPERSON_ID] = 'XXX' ]
Update suceeds, fails to process correctly, because the SALESPERSON_ID
should be WWW instead of XXX, so SALESPERSON_ID has not changed. The
only way that I can make this work is to change the following:
TIBOQuery.RequestLive = True;
TIBOQuery.Unidirectional = False;
TDataSetProvider.ResolveToDataSet := True;
But if I do this, I am using both the TIBOQuery and TClientDataSet to
cache data (due to Unidirectional), so I know this can't be the
correct procedure. Please Help.
I am using D7, Interbase 6.01 OS, IBO 4.2