Thoughts from Dan Miser RSS 2.0
 Wednesday, December 14, 2005
My co-worker, Jeff Chojnacki, bumped into this problem today. Basically, if you have a 2-tier setup with ClientDataset, DatasetProvider, SQLQuery, etc., and have code that looks similar to this:

   cds1.Close;
   q1.SQL.Text := 'SELECT * FROM COUNTRY WHERE COUNTRY LIKE :COUNTRY';
   q1.Params.ParamByName('COUNTRY').AsString := eCountry.Text+'%';
   cds1.Open;

you will find that the data in cds1 never updates. IOW, if you first pass an 'A', and then pass an 'F', the data will always return as if you are passing the 'A' param.

I used Jeff's test-case and did some debugging and found a work-around, and I believe, the true solution. The work-around is to just call cds1.Params.Clear after cds1.Close. The solution is that TDatsetProvider is returning ptInput Params improperly in DoGetRecords. For all of the gory details, see QC 22335. Hopefully this gets resolved in Update 2.

Wednesday, December 14, 2005 1:57:00 PM (Central Standard Time, UTC-06:00)  #    Comments [4] -

Tracked by:
http://9nu-information.info/77448306/index.html [Pingback]
http://9nr-information.info/61837405/index.html [Pingback]
http://9nc-information.info/17731578/index.html [Pingback]
http://9nd-information.info/84637952/index.html [Pingback]
http://9nv-information.info/56148269/index.html [Pingback]
http://9nq-information.info/63869409/money-magnet.html [Pingback]
http://9nc-information.info/87603680/ocala-medical-malpractice-lawyer.html [Pingback]
http://9nl-information.info/42371046/personal-management-merit-badge-aswers.html [Pingback]
http://9nh-information.info/41016607/manufactured-home-compodents.html [Pingback]
http://9om-information.info/96701805/index.html [Pingback]
http://9on-information.info/55249665/index.html [Pingback]
http://9oj-information.info/69166038/index.html [Pingback]
http://9os-information.info/73018795/star-wars-theme-song-sheet-music.html [Pingback]
http://9op-information.info/52308499/index.html [Pingback]
http://9og-information.info/84423723/used-truck-mount-carpet-cleaning-equipment.... [Pingback]
http://9om-information.info/59068890/index.html [Pingback]
http://9ol-information.info/18083020/index.html [Pingback]
http://9sm-information.info/19833414/riparazione-flipper.html [Pingback]
http://9sp-information.info/80588873/index.html [Pingback]
http://9sc-information.info/74786617/index.html [Pingback]
http://9rc-information.info/28505237/software-of-business-process.html [Pingback]
http://9ra-information.info/70127484/index.html [Pingback]
http://9uafd-le-informazioni.info/45093255/index.html [Pingback]
http://9uafs-le-informazioni.info/00951618/index.html [Pingback]
http://9uafj-le-informazioni.info/92600415/index.html [Pingback]
http://9uaff-le-informazioni.info/87076817/index.html [Pingback]
http://9uafg-le-informazioni.info/76211114/index.html [Pingback]
http://9uafa-le-informazioni.info/56550957/index.html [Pingback]
http://9uaea-le-informazioni.info/44695380/index.html [Pingback]
http://9uaee-le-informazioni.info/58626725/index.html [Pingback]
http://9uafi-le-informazioni.info/22503415/index.html [Pingback]
http://9uahi-le-informazioni.info/07655189/index.html [Pingback]
http://9uahm-le-informazioni.info/73267571/consigliera-gaudio.html [Pingback]
http://9uagc-le-informazioni.info/54589949/treo-650-donwload.html [Pingback]
http://9uagd-le-informazioni.info/58030132/giubbotto-refrigwear-uomo.html [Pingback]
http://9uahq-le-informazioni.info/72332064/104-art-3-comma1.html [Pingback]
http://9uahk-le-informazioni.info/61844758/come-installare-due-sistemi-operativi... [Pingback]
http://9uagn-le-informazioni.info/27159402/index.html [Pingback]
http://9uahk-le-informazioni.info/75938795/stabia-rugby.html [Pingback]
http://9uahc-le-informazioni.info/98927629/index.html [Pingback]
Wednesday, December 14, 2005 6:31:00 PM (Central Standard Time, UTC-06:00)
Actually, I think this was introduced in D2005. I noticed it when porting our app a month ago. We are moving to 2006 now, and I can definitely reproduce it in both versions.
Wednesday, December 14, 2005 7:02:00 PM (Central Standard Time, UTC-06:00)
Maybe this was there from D6? I think I remember this vaguely. Also, why don't you cache the small amount of Country data in CDS and filter on that so that you don't need to use network for such a poor query with a "LIKE" Clause, yuck. JMHO.
Bill Myers
Wednesday, December 14, 2005 7:13:00 PM (Central Standard Time, UTC-06:00)
Thanks, Ryan. Good to know.



Bill, man, do I hope you're kidding! If not, it's called a test case. ;-)
Thursday, December 15, 2005 8:57:00 AM (Central Standard Time, UTC-06:00)
Ok sorry. You're right, I need to lighten up. I spend too much time fixing server code all day. Whew, I need a vacation. ;-)
Bill Myers
Comments are closed.
Navigation
Archive
<August 2008>
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008
Dan Miser
Sign In
Statistics
Total Posts: 307
This Year: 22
This Month: 1
This Week: 1
Comments: 604
All Content © 2008, Dan Miser
DasBlog theme 'Business' created by Christoph De Baene (delarou)