Board index » delphi » UpdateSQL

UpdateSQL

I have displayed selected data from a MVS DB2 table in a DBGrid and want
to update certain fields. Because the SQL select uses a LIKE with a %
and an order by statment, I cannot use the POST method. I have tried an
UpdateSQL and have managed to update the table, but those changes are
not reflected in the DBGrid unless I run the SELECT statement again. I
imagine that there is a way to do it, but I am currently at a loss. Any
help would be appreciated. I am using Delphi 3 - Developer version.
Bill Peterson

 

Re:UpdateSQL


Bill,
It's the "like" NOT the "order by" which causes the select to be read only.
Yes, you use the UpdateSQL in this case and leave the query at it's deafult
of requestlive=false.
The only way to then show the changes is to commit (i.e. applyupdates) then
close and reopen the query. You get it back with all the changes - hey
presto...

Quote
BILL PETERSON wrote in message <34725D6F.1...@startext.net>...
>I have displayed selected data from a MVS DB2 table in a DBGrid and want
>to update certain fields. Because the SQL select uses a LIKE with a %
>and an order by statment, I cannot use the POST method. I have tried an
>UpdateSQL and have managed to update the table, but those changes are
>not reflected in the DBGrid unless I run the SELECT statement again. I
>imagine that there is a way to do it, but I am currently at a loss. Any
>help would be appreciated. I am using Delphi 3 - Developer version.
>Bill Peterson

Other Threads