| Author |
APPEND BLANK does not work in WIN XP !
|
|
| Marco A. Cruz Q. 2004-11-16, 6:43 pm |
| 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
| |
| Matt Johnson 2004-11-16, 6:43 pm |
| You 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
>
| |
| Marco A. Cruz Q. 2004-11-16, 6:43 pm |
| Everybody:
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
| |
| Marco A. Cruz Q. 2004-11-16, 6:43 pm |
| "Claudio Voskian" <mixxell@hotmail.com> wrote in message news:<2v2ovvF2gb969U1@uni-berlin.de>...
> 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 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
Claudio
I am very interested in the link but it is broken! Do you have an updated link?
Than you
Marco A. Cruz Quevedo
> They could solve your problems.
>
> HTH
> --
> Saluten
> Claudio
> Buenos Aires - Argentina
| |
| Nick Ramsay 2004-11-16, 6:43 pm |
| On 6 Nov 2004 23:21:51 -0800, macruzq@todito.com (Marco A. Cruz Q.)
wrote:
>"Claudio Voskian" <mixxell@hotmail.com> wrote in message news:<2v2ovvF2gb969U1@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
| |
| dragan 2004-11-16, 6:43 pm |
| Try 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
| |
| Ian Boys 2004-11-16, 6:43 pm |
| Two 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
| |
| Marco A. Cruz Q. 2004-11-16, 6:43 pm |
| "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
| |
| Ian Boys 2004-11-16, 6:43 pm |
| 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
"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
| |
| Claudio Voskian 2004-11-16, 6:43 pm |
| 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 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..."
| |
| Colin Haig 2004-11-16, 6:43 pm |
| Marco
Move your data to the XP machine - use the 98SE machines
as workstations.
Cheers
Colin
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
|
|
|
|