Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Karl Wochele Newsgroups: comp.lang.clipper.visual-objects Subject: Re: Records not updated using Upper() Date: Tue, 17 Sep 2013 15:53:06 +0200 Lines: 42 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net xmBrkevbutlIykpC9j1RSwAZExDDbOeHwO9J1ivxlKIYyH9ioi Cancel-Lock: sha1:0+RtmU+7bA4KrVxcQgT/6aNYQP8= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: Xref: csiph.com comp.lang.clipper.visual-objects:5835 Hi Rob, you should insert oServer:Setorder(0) before oServer:gotop() If you change the KeyValue of the current record your next skip might take you anywhere, even to eof() ... HTH Karl Am 17.09.2013 15:42, schrieb Rob van Erk: > I have a DBF with upper and lower case data in field COMPNAME. I need to uppercase all data in that field. The DBF's allows duplicate records and the index is on COMPNAME. The following code refuses to change contents of COMPNAME to uppercase for the first record > > COMPNAME > ======== => output: > artmcxa01 artmcxa01 > artmcxa01 ARTMCXA01 > artmcxa02 artmcxa02 > artmcxa02 ARTMCXA02 > artmcxa03 ARTMCXA03 > artmcxa04 ARTMCXA04 > > Why is the first record not changed to uppercase? > > Code: > > local sComp as string > > oServer:= DSComputersImport{} > oServer:Zap() > > oServer:Appenddelimited("c:\snow\computers.csv",",") > oServer:GoTop() > > do while !oServer:EoF > sComp := upper(oServer:FIELDGET(#compname)) > oServer:FIELDPUT(#compname, sComp) > oServer:Skip(1) > enddo > oServer:Close() > > Thanks for any advise to solve this issue. >