Subject Re: [IBO] Bug or Newbie issue: DataSetProvider not updating properly
Author Jason Wharton
If you would please send me a sample app of this for me to look at I'll be
happy to see if there is a problem in IBO I can resolve.

I've actually gotten through a fair number of cases sent to me over the past
months. I'm shooting to get back to my normal one or two day turn-around on
bug issues.

Jason

----- Original Message -----
From: "rlong99" <rlong99@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, August 25, 2003 1:29 PM
Subject: [IBO] Bug or Newbie issue: DataSetProvider not updating properly


> 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
>