Code Comments
Programming Forum and web based access to our favorite programming groups.The following progam is run in two worksations use base index base shared new if fillock(0) append blank //-- stuff fields commit unlock endif The application is in a WIN98SE server, and runs in several WIN98SE workstation and in WINXP. The WINXP overwrites the last record instead writing the new APPENDed record! Any ideas? The base is open by other workstations when this happens. Thanks in advance Marco A. Cruz Quevedo
Post Follow-up to this messageYou should make the XP box the server as win98 is a poor server choice. "Marco A. Cruz Q." <macruzq@todito.com> wrote in message news:12796de5.0411041028.67eb723b@posting.google.com... > The following progam is run in two worksations > > use base index base shared new > if fillock(0) > append blank > //-- stuff fields > commit > unlock > endif > > The application is in a WIN98SE server, and runs in several WIN98SE > workstation and in WINXP. The WINXP overwrites the last record instead > writing the new APPENDed record! Any ideas? The base is open by other > workstations when this happens. > > Thanks in advance > > Marco A. Cruz Quevedo >
Post Follow-up to this messageEverybody: I tried the link given some messages ago, but did not worked. What I had to do was to replace WINXP by WIN98. Anyway thanks for the link and your suggestions Regards Marco A. Cruz Quevedo
Post Follow-up to this message"Claudio Voskian" <mixxell@hotmail.com> wrote in message news:<2v2ovvF2gb969U1@uni-berlin.d e>... > Hi Marco > > "Marco A. Cruz Q." <macruzq@todito.com> escribió en el mensaje > news:12796de5.0411051402.49d87878@posting.google.com... > | "Ian Boys" <TooMuchSpam@BTInternet.com> wrote in message > news:<cme58g$a5i$1@hercules.btinternet.com>... > | > Marco, > | > > | > To add a record in shared mode you do not need to filelock, just appen d > | > blank and check for success with NetErr() > | > > | > Append Blank > | > If .not. Neterr() > | > //do your updates > | > else > | > // failed > | > Endif > | > > | > There is a file that comes with the Clipper samples, Locks.prg that > contains > | > functions for adding records, opening files, locking in network > environments > | > that works well. > | > > | > Ian Boys > | > > | Ian: > | > | The original program was > | > | if addrec(0) > | //-- update > | commit > | unlock > | endif > | > | But i changed to make sure that the database was properly updated. The > | win98 ws does right but the WINxp ws supposedly appends but does not, > | and even corrupts the index!, overwriting the last record instead > | writing the new one. After this > | all workstations follow the wrong index. <g> > | > | Regards > | > | Marco A. Cruz Quevedo > > IMO you should install the registry patches only for the xp box as in: > www.witzends.co.uk/html/nt_networking.html Claudio I am very interested in the link but it is broken! Do you have an updated li nk? Than you Marco A. Cruz Quevedo > They could solve your problems. > > HTH > -- > Saluten > Claudio > Buenos Aires - Argentina
Post Follow-up to this messageOn 6 Nov 2004 23:21:51 -0800, macruzq@todito.com (Marco A. Cruz Q.) wrote: >"Claudio Voskian" <mixxell@hotmail.com> wrote in message news:<2v2ovvF2gb96 9U1@uni-berlin.de>... >Claudio > I am very interested in the link but it is broken! Do you have an updated link? > Only slightly broken: http://www.witzendcs.co.uk/html/nt_networking.html
Post Follow-up to this messageTry this use base index base shared new if fillock(0) append blank //-- stuff fields unlock commit endif Marco A. Cruz Q. wrote: > The following progam is run in two worksations > > use base index base shared new > if fillock(0) > append blank > //-- stuff fields > commit > unlock > endif > > The application is in a WIN98SE server, and runs in several WIN98SE > workstation and in WINXP. The WINXP overwrites the last record instead > writing the new APPENDed record! Any ideas? The base is open by other > workstations when this happens. > > Thanks in advance > > Marco A. Cruz Quevedo
Post Follow-up to this messageTwo pragmatic solutions: 1. After the AddRec check that a key field is empty, if not then it's not a new record. 2. Add a block of blank records, on a timeout or records maintenance procedure maybe. That way there is slightly less fragmentation of the disk and you edit existing blank data rather than keep adding records on the fly, which may even be a little quicker. I have to say that I have not encountered this problem on any of the networks I look after. Ian Boys DTE
Post Follow-up to this message"Ian Boys" <TooMuchSpam@BTInternet.com> wrote in message news:<cme58g$a5i$1@hercules.btinte rnet.com>... > Marco, > > To add a record in shared mode you do not need to filelock, just append > blank and check for success with NetErr() > > Append Blank > If .not. Neterr() > //do your updates > else > // failed > Endif > > There is a file that comes with the Clipper samples, Locks.prg that contai ns > functions for adding records, opening files, locking in network environmen ts > that works well. > > Ian Boys > Ian: The original program was if addrec(0) //-- update commit unlock endif But i changed to make sure that the database was properly updated. The win98 ws does right but the WINxp ws supposedly appends but does not, and even corrupts the index!, overwriting the last record instead writing the new one. After this all workstations follow the wrong index. <g> Regards Marco A. Cruz Quevedo
Post Follow-up to this messageMarco, To add a record in shared mode you do not need to filelock, just append blank and check for success with NetErr() Append Blank If .not. Neterr() //do your updates else // failed Endif There is a file that comes with the Clipper samples, Locks.prg that contains functions for adding records, opening files, locking in network environments that works well. Ian Boys "Marco A. Cruz Q." <macruzq@todito.com> wrote in message news:12796de5.0411041028.67eb723b@posting.google.com... > The following progam is run in two worksations > > use base index base shared new > if fillock(0) > append blank > //-- stuff fields > commit > unlock > endif > > The application is in a WIN98SE server, and runs in several WIN98SE > workstation and in WINXP. The WINXP overwrites the last record instead > writing the new APPENDed record! Any ideas? The base is open by other > workstations when this happens. > > Thanks in advance > > Marco A. Cruz Quevedo
Post Follow-up to this messageHi Marco "Marco A. Cruz Q." <macruzq@todito.com> escribió en el mensaje news:12796de5.0411051402.49d87878@posting.google.com... | "Ian Boys" <TooMuchSpam@BTInternet.com> wrote in message news:<cme58g$a5i$1@hercules.btinternet.com>... | > Marco, | > | > To add a record in shared mode you do not need to filelock, just append | > blank and check for success with NetErr() | > | > Append Blank | > If .not. Neterr() | > //do your updates | > else | > // failed | > Endif | > | > There is a file that comes with the Clipper samples, Locks.prg that contains | > functions for adding records, opening files, locking in network environments | > that works well. | > | > Ian Boys | > | Ian: | | The original program was | | if addrec(0) | //-- update | commit | unlock | endif | | But i changed to make sure that the database was properly updated. The | win98 ws does right but the WINxp ws supposedly appends but does not, | and even corrupts the index!, overwriting the last record instead | writing the new one. After this | all workstations follow the wrong index. <g> | | Regards | | Marco A. Cruz Quevedo IMO you should install the registry patches only for the xp box as in: www.witzends.co.uk/html/nt_networking.html They could solve your problems. HTH -- Saluten Claudio Buenos Aires - Argentina -- "Argentina crece gracias a que sus políticos y gobernantes dejan de robar cuando duermen..."
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.