Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

APPEND BLANK does not work in WIN XP !
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

Report this thread to moderator Post Follow-up to this message
Old Post
Marco A. Cruz Q.
11-16-04 11:43 PM


Re: APPEND BLANK does not work in WIN XP !
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
>



Report this thread to moderator Post Follow-up to this message
Old Post
Matt Johnson
11-16-04 11:43 PM


Re: APPEND BLANK does not work in WIN XP !
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

Report this thread to moderator Post Follow-up to this message
Old Post
Marco A. Cruz Q.
11-16-04 11:43 PM


Re: APPEND BLANK does not work in WIN XP !
"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

Report this thread to moderator Post Follow-up to this message
Old Post
Marco A. Cruz Q.
11-16-04 11:43 PM


Re: APPEND BLANK does not work in WIN XP !
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:<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


Report this thread to moderator Post Follow-up to this message
Old Post
Nick Ramsay
11-16-04 11:43 PM


Re: APPEND BLANK does not work in WIN XP !
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

Report this thread to moderator Post Follow-up to this message
Old Post
dragan
11-16-04 11:43 PM


Re: APPEND BLANK does not work in WIN XP !
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



Report this thread to moderator Post Follow-up to this message
Old Post
Ian Boys
11-16-04 11:43 PM


Re: APPEND BLANK does not work in WIN XP !
"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

Report this thread to moderator Post Follow-up to this message
Old Post
Marco A. Cruz Q.
11-16-04 11:43 PM


Re: APPEND BLANK does not work in WIN XP !
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



Report this thread to moderator Post Follow-up to this message
Old Post
Ian Boys
11-16-04 11:43 PM


Re: APPEND BLANK does not work in WIN XP !
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..."



Report this thread to moderator Post Follow-up to this message
Old Post
Claudio Voskian
11-16-04 11:43 PM


Sponsored Links




Last Thread Next Thread Next
Pages (2): [1] 2 »
Search this forum -> 
Post New Thread

Clipper archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:12 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.