Board index » delphi » refresh BLOB after updated does not work properly

refresh BLOB after updated does not work properly


2006-12-01 06:24:53 AM
delphi101
Hi All, Please help me.
I am updating a big database application from Delphi5 En. with IBX 4.2
to Delphi 2005 En. IBX 9.09. I use TIBQuery with TIBUpdateSQL for most
of data including BLOB for memo text. It all works fine in Delphi 5.
Now with Delphi 2005, after call TIBQuery.Applyupdates, then
Transaction.CommitRetaining, ModifySQL did update text change (BLOB) to
server, but if I move to another record and come back, TDBMemo display
old text content. If call TIBQuery.ApplyUpdates, then
Transaction.Commit and re-open IBQuery then TDBMemo will display
updated text content. But I don't want to close the transaction. What
cause this and how to work around. Any help will be appreciated.
Thanks in advance.
Jessica
 
 

Re:refresh BLOB after updated does not work properly

Jessica writes:
Quote
Hi All, Please help me.

I am updating a big database application from Delphi5 En. with IBX 4.2
to Delphi 2005 En. IBX 9.09. I use TIBQuery with TIBUpdateSQL for most
of data including BLOB for memo text. It all works fine in Delphi 5.
Now with Delphi 2005, after call TIBQuery.Applyupdates, then
Transaction.CommitRetaining, ModifySQL did update text change (BLOB) to
server, but if I move to another record and come back, TDBMemo display
old text content. If call TIBQuery.ApplyUpdates, then
Transaction.Commit and re-open IBQuery then TDBMemo will display
updated text content. But I don't want to close the transaction. What
cause this and how to work around. Any help will be appreciated.

Thanks in advance.

Jessica

Try getting the latest from codecentral.borland.com/Author.aspx
Nothing like this has ever been reported.
--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
A human being should be able to change a diaper, plan an invasion, butcher
a hog, conn a ship, design a building, write a sonnet, balance accounts, build
a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act
alone, solve equations, analyze a new problem, pitch manure, program a computer,
cook a tasty meal, fight efficiently, die gallantly. Specialization is for
insects. (RAH)
 

Re:refresh BLOB after updated does not work properly

Hello Jeff,
Thankyou for your response. But I still have the same problem. What I
found out is that when I scroll record I need to call DataSet.Edit to
set current record in editing mode. It seems that cause old BLOB
content re-appear when I scroll back from another record.
My Transaction parameters are
isc_tpb_write
isc_tpb_read_committed
isc_tpb_rec_version
isc_tpb_nowait
Please check for me if is correct.
Thanks
Jeff Overcash (TeamB) writes:
Quote
Jessica writes:
>Hi All, Please help me.
>
>I am updating a big database application from Delphi5 En. with IBX 4.2
>to Delphi 2005 En. IBX 9.09. I use TIBQuery with TIBUpdateSQL for most
>of data including BLOB for memo text. It all works fine in Delphi 5.
>Now with Delphi 2005, after call TIBQuery.Applyupdates, then
>Transaction.CommitRetaining, ModifySQL did update text change (BLOB) to
>server, but if I move to another record and come back, TDBMemo display
>old text content. If call TIBQuery.ApplyUpdates, then
>Transaction.Commit and re-open IBQuery then TDBMemo will display
>updated text content. But I don't want to close the transaction. What
>cause this and how to work around. Any help will be appreciated.
>
>Thanks in advance.
>
>Jessica
>

Try getting the latest from codecentral.borland.com/Author.aspx
Nothing like this has ever been reported.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
A human being should be able to change a diaper, plan an invasion, butcher
a hog, conn a ship, design a building, write a sonnet, balance accounts, build
a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act
alone, solve equations, analyze a new problem, pitch manure, program a computer,
cook a tasty meal, fight efficiently, die gallantly. Specialization is for
insects. (RAH)
 

Re:refresh BLOB after updated does not work properly

Hi All,
My case is make changes for some field including a BLOB text field.
After call TIBQuery.ApplyUpdates and TIBTransaction.CommitRetaining, if
call TIBQuery.Cancel later, TDBMemo will display old BLOB text. Please
help!!!
Jessica writes:
Quote
Hello Jeff,

Thankyou for your response. But I still have the same problem. What I
found out is that when I scroll record I need to call DataSet.Edit to
set current record in editing mode. It seems that cause old BLOB
content re-appear when I scroll back from another record.

My Transaction parameters are

isc_tpb_write
isc_tpb_read_committed
isc_tpb_rec_version
isc_tpb_nowait

Please check for me if is correct.

Thanks

Jeff Overcash (TeamB) writes:
>Jessica writes:
>>Hi All, Please help me.
>>
>>I am updating a big database application from Delphi5 En. with IBX 4.2
>>to Delphi 2005 En. IBX 9.09. I use TIBQuery with TIBUpdateSQL for most
>>of data including BLOB for memo text. It all works fine in Delphi 5.
>>Now with Delphi 2005, after call TIBQuery.Applyupdates, then
>>Transaction.CommitRetaining, ModifySQL did update text change (BLOB) to
>>server, but if I move to another record and come back, TDBMemo display
>>old text content. If call TIBQuery.ApplyUpdates, then
>>Transaction.Commit and re-open IBQuery then TDBMemo will display
>>updated text content. But I don't want to close the transaction. What
>>cause this and how to work around. Any help will be appreciated.
>>
>>Thanks in advance.
>>
>>Jessica
>>
>
>Try getting the latest from codecentral.borland.com/Author.aspx
>Nothing like this has ever been reported.
>
>--
>Jeff Overcash (TeamB)
>(Please do not email me directly unless asked. Thank You)
>A human being should be able to change a diaper, plan an invasion, butcher
>a hog, conn a ship, design a building, write a sonnet, balance accounts, build
>a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act
>alone, solve equations, analyze a new problem, pitch manure, program a computer,
>cook a tasty meal, fight efficiently, die gallantly. Specialization is for
>insects. (RAH)
 

Re:refresh BLOB after updated does not work properly

Try it without cached updates.
If you really need cached updates then I would recommend using
TClientDataSet instead of the IBX cached updates feature.
--
Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH
Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz
Please read and follow Borland's rules for the user of their
server: support.borland.com/entry.jspa
 

Re:refresh BLOB after updated does not work properly

Jessica writes:
Quote
But how to delete record with TIBQuery and
TIBUpdateSQL with CachedUpdates=false.
Set the IBUpdateSQL.DeleteSQL to an appropriate query and call
TIBQuery.Delete.
--
Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH
Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz
Please read and follow Borland's rules for the user of their
server: support.borland.com/entry.jspa
 

Re:refresh BLOB after updated does not work properly

Hi Craig,
Thank you for your suggestion.
Set TIBQuery.CachedUpdates := false and Call TIBQuery.Post after
changed instead of ApplyUpdates and then TIBTransaction.CommitRetaining
did solve BLOB problem. But how to delete record with TIBQuery and
TIBUpdateSQL with CachedUpdates=false.
I use TIBQuery and TIBUpdateSQL for all my approximate 100 tables and a
lot of them are master/detail, change all to TClientDataSet will be a
lot of work.
I don't really need cachedupdate because after user editing a record he
has to choose between save to server or lost it before he can move to
another record. And user can insert and delete records with every
insert and delete update to server immediately. My database application
is about 7 MB and I only use IBX and it all works fine in D5. But a lot
of problem in D2005. Any advice from you and others will be great
appreciated.
Thanks
Craig Stuntz [TeamB] writes:
Quote
Try it without cached updates.

If you really need cached updates then I would recommend using
TClientDataSet instead of the IBX cached updates feature.

--
Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH
Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz
Please read and follow Borland's rules for the user of their
server: support.borland.com/entry.jspa
 

Re:refresh BLOB after updated does not work properly

Thank you so much for your advice. I am getting progress.
Craig Stuntz [TeamB] writes:
Quote
Jessica writes:

>But how to delete record with TIBQuery and
>TIBUpdateSQL with CachedUpdates=false.

Set the IBUpdateSQL.DeleteSQL to an appropriate query and call
TIBQuery.Delete.

--
Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH
Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz
Please read and follow Borland's rules for the user of their
server: support.borland.com/entry.jspa