Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Windows 7 corruption network

961 views
Skip to first unread message

Jean-Luc Stassen

unread,
Dec 8, 2010, 5:16:04 AM12/8/10
to
Hello,

I have a custormer that have 4 computers in windows 7 pro. A computer
is the server, with a hardisk K whare my datas are installed.
The 3 others computers access de data over the network (1gb) with de
same app. 2 of them cause corruption in index, and do not write de
data correctly in the dbf/cdx files.

Does someone has any experience with this kind of problem ?


TIA
Jean-Luc

richard.townsendrose

unread,
Dec 8, 2010, 6:52:58 AM12/8/10
to
Jean-Luc

Yes, many many years ago we had this with windows 95 ... solved with
Advantage running on the w95 pc which had the data.

guess also geoff will add some advice ...

Richard

[snowed in old castle road, cathcart, glasgow !]

Fabrice Foray

unread,
Dec 8, 2010, 7:36:56 AM12/8/10
to
OffTopic :

>
> [snowed in old castle road, cathcart, glasgow !]

God ! Just hope the road to Old Smiddy is clear ! :)

Cheers,
Fabrice

Jean-Luc Stassen

unread,
Dec 8, 2010, 11:05:40 AM12/8/10
to

I think I have found a solution !

I have noticed that all the 3 computers log onto the server with the
same login. Now I have created 3 differents login and it seems to work
fine.
I guess MS doesn't manage de concurrency control correctly if the user
are the same !

Thank you MS !

Jean-Luc

Geoff Schaller

unread,
Dec 8, 2010, 4:15:59 PM12/8/10
to
J-L,

This has nothing to do with Microsoft. The windows user plays no part in
this and concurrency is managed totally from within VO. Something is
different from within your application that is user based.

Geoff

"Jean-Luc Stassen" <j...@igsoft.be> wrote in message
news:c071a570-5f8e-4d2c...@j29g2000yqm.googlegroups.com:

richard.townsendrose

unread,
Dec 9, 2010, 3:35:41 AM12/9/10
to
Fabrice

Sure is ... but only the lager has run out - lots of single malt and
real ale...

Big Christine went to Australia ... looking for a man I guess...

and for Paolo - burgers are still on the menu ...

Richard

Jean-Luc Stassen

unread,
Dec 10, 2010, 10:19:18 AM12/10/10
to
Finaly, my solution was not the solution !
Something else fails... but what..

Ok, so we have 4 computers in windows 7:

server
station1
station2
station3

when station1 and server work on data on server, no problem
when station2 and server work on data on server, no problem
when station3 and server work on data on server, no problem

when station1 and station2 and server work on data on server, some
data are not saved, and data index files are corrupted...
There are no error in the app... everything works fine

Data are DBF/CDX files

Does SMB can have something to do here, because all the computer are
in Windows 7... ?

Any help...
Jean-Luc

Massimo Bighelli

unread,
Dec 10, 2010, 10:23:52 AM12/10/10
to
JL

do you have "corrected" the registry on the server (locking options) ??

Massimo


"Jean-Luc Stassen" <j...@igsoft.be> ha scritto nel messaggio
news:44418930-6e43-4e2d...@r29g2000yqj.googlegroups.com...

Jean-Luc Stassen

unread,
Dec 10, 2010, 11:38:27 AM12/10/10
to
Hello Massimo,

What do you mean by "Corrected" the registry ?

I don't yet touch the registry...
Can you tell my what can I change ?

Jean-Luc

dlzc

unread,
Dec 10, 2010, 12:26:38 PM12/10/10
to
Dear Jean-Luc Stassen

Possibly:
http://support.microsoft.com/kb/296264
... I'd be surprised if you searched this newsgroup, that there was
not already a VO-friendly fix for this. Something your program might
be able to repair / work-around.

David A. Smith

Geoff Schaller

unread,
Dec 10, 2010, 5:31:49 PM12/10/10
to
No, SMB has nothing to do with this.
Stay with all defaults - do NOT change them.

Let me assume that all workstations and server (a 'real' server or PC?)
all use the same network protocol and you have a reasonable network
switch, the cards are all set to Auto and work properly and there are no
stray protocols installed. If this is correct then there are only two
possible options:

1. If you are using ccOptimistic (and you should) then you have
concurrency issues - but I also assume the problem is only when two
people work in the same DBF. If not, it is environmental.

2. If you are using ccNone then your locking and commit logic is wrong.

That a single application can work is proof that this is a coding issue.
You will have to give us more to go on.

Geoff

"Jean-Luc Stassen" <j...@igsoft.be> wrote in message

news:44418930-6e43-4e2d...@r29g2000yqj.googlegroups.com:

Willie Moore

unread,
Dec 10, 2010, 11:05:26 PM12/10/10
to
If you have a copy of wireshark around, you can run a sniff on the server
while the machines try to access the data. Using a sniffer is a very good
way of isolating the problem. But you have to run it on the server that is
having the issue or on a different box lugged into a hub that the server is
on. If you plug a sniffer into a switch that doesn’t support port mirroring,
you will only get the broadcasts and they aren't real useful.

When I go onsite to sniff problems, I carry an old 100mbs hub so I get all
the traffic in and out.

Regards,
Willie

"Jean-Luc Stassen" wrote in message
news:44418930-6e43-4e2d...@r29g2000yqj.googlegroups.com...

Jean-Luc Stassen

unread,
Dec 11, 2010, 4:59:43 AM12/11/10
to
Ok. I've already test the network, it seems good. No drop.

I use shared dbserver, and I always manage the record locking.
I also close the files once the work is done.

I don't set ccOptimistic anywhere, because I manager record locking
for each transaction. I also do commit when I don't close the file
immediatly.


Jean-Luc

Geoff Schaller

unread,
Dec 12, 2010, 3:53:38 AM12/12/10
to
Then if you are doing all this there can't be a problem and you don't
need our help.


"Jean-Luc Stassen" <j...@igsoft.be> wrote in message

news:d7f3fc1e-5982-4f37...@h22g2000vbr.googlegroups.com:

Peter Gargos

unread,
Dec 12, 2010, 1:48:24 PM12/12/10
to

Disable SMB2 -
in command line :
sc config lanmanworkstation depend= bowser/mrxsmb10/nsi
sc config mrxsmb20 start= disabled

next restart computer

Peter Gargos


Darmadi

unread,
Dec 13, 2010, 1:42:06 AM12/13/10
to
Yes, sometimes I have same problem in Win 7 worked as server (mostly
occurred, and need to reindex my index files) but not in Win XP or Linux.
But only happen 2 of my clients in 7 of my clients that using Win 7 as
server.

I'm monitoring this news, hope could solve the problem...

Darmadi

"Jean-Luc Stassen" <j...@igsoft.be> wrote in message

news:d7f3fc1e-5982-4f37...@h22g2000vbr.googlegroups.com...

Jean-Luc Stassen

unread,
Dec 13, 2010, 4:30:27 PM12/13/10
to
Ok thank you Darmadi, I will try to modify the registry.
I will keep this post informed...

Geoff, believe me, there is a problem with something, otherwise I will
not ask for help...

Jean-Luc

dlzc

unread,
Dec 13, 2010, 8:44:23 PM12/13/10
to
Dear Jean-Luc Stassen:

Sorry, I believe he has asked *how* you are doing all those things you
do, at least once. He needs to see your code.

We know something is wrong, and we know the operating system is not at
fault, and the problem is not specific to VO (or others would have
this also)... so this leaves your code, and the assumptions behind it.

Don't reply to me...

David A. Smith

Massimo Bighelli

unread,
Dec 14, 2010, 6:41:29 AM12/14/10
to
David,

... I have to reply to you: I (and others) think there is something wrong in
the OS, or at least something wrong in the OS config.
This happens sometimes and only for distributed file database on Vista/w7:
look at SMB2 problem (google it) and at the opportunity to disable
optimistic locking under certain circumstances.
IMO it's a matter of cache and lock.
How many of us, still working with DBFCDX, have files shared on
Vista/W7/server2008 ?
Just curious.

Massimo Bighelli
ARCA Sistemi S.r.l.

"dlzc" <dl...@cox.net> ha scritto nel messaggio
news:c59d183b-23dc-41af...@r38g2000prj.googlegroups.com...

dlzc

unread,
Dec 14, 2010, 9:06:38 AM12/14/10
to
Dear Massimo Bighelli:

On Dec 14, 4:41 am, "Massimo Bighelli" <i...@arcasistemi.it> wrote:
> David,
>
> ... I have to reply to you: I (and others) think
> there is something wrong in the OS, or at least
> something wrong in the OS config.

And this is not new, either the fact or the belief. So if it is a
known problem, the problem goes away when his users have different
user names, then it is *at heart* the lax rules permitted (at least in
Windoze) in peer-to-peer networks. That Jean-Luc believes he is
"handling" things, yet the problem persists, means he is being
naieve. That you insist on an OS-level "fix" is distracting Jean-Luc.

> This happens sometimes and only for distributed
> file database on Vista/w7: look at SMB2 problem
> (google it) and at the opportunity to disable
> optimistic locking under certain circumstances.
> IMO it's a matter of cache and lock.

Had this problem under NT and XP too. This is the way that M$ wants
to go, how they want to handle it. If you own stock, you'd have a
possible say in changing this. If you don't, you are fighting all the
partners of M$ in asking for a behavior counter to the one agreed on
between them. And if you twist the OS into DOS-like behavior, then
you risk breaking some of the user's other applications.

The horse is moving in this direction. It'll be a lot easier if you
turn around and ride it in this direction, rather than disassembling /
reassembling the horse have have it pointing the wrong way.

I am wondering why all the helpful people here have not pointed out
how SQL (or similar server-based data-handler) would have obviated the
issue being reported. Pointing to the OS and niggling with OpLocks is
a futile exercise, when it can all come undone with any update from M
$. Or so it seems to me.

David A. Smith

Willie Moore

unread,
Dec 14, 2010, 10:29:17 AM12/14/10
to
David,

I am not going to hassle anyone over their continued use of DBF. I have gone
on to SQL but there are perfectly valid situations where DBF is still a good
choice.

The SMB settings do not get overwritten by Microsoft updates. But to be on
the safe side, I always had a copy of the batch file I used to reset them
just in case. With the changes to the registry has changed in Vista and W7,
I would not run my batch files against a W7 box. I would need to research
the correct entries to touch.

Regards,
Willie

Geoff Schaller

unread,
Dec 14, 2010, 4:17:55 PM12/14/10
to
J-L,

Believe me.... it is in your code. You seem reluctant to show it. Twice
I have suggested what might be the issue and twice you have bounced back
"telling" us you are doing everything correctly. Not once have you shown
us the actual mechanisms you are using in your code.

Let me be clear: IT IS NOTHING TO DO WITH THE OS, SMB or other bullshit
or hair brained idea that once again, Microsoft is somehow to blame for
our coding woes <g>.

Sorry to be blunt but you are not helping us to help you.

Geoff


"Jean-Luc Stassen" <j...@igsoft.be> wrote in message

news:d5469b8e-d0ec-4dab...@fj16g2000vbb.googlegroups.com:

Geoff Schaller

unread,
Dec 14, 2010, 4:19:25 PM12/14/10
to
What utter rubbish Massimo.
Do not change these things from their defaults. Ever!

How many DBF based W7 installations working perfectly would you like me
to show you?

But I know what I can show you... a lot of VO'ers who clearly don't
understand contention and optimistic locking mechanisms.

Geoff

"Massimo Bighelli" <in...@arcasistemi.it> wrote in message
news:ie7l57$arr$1...@speranza.aioe.org:

Massimo Bighelli

unread,
Dec 15, 2010, 6:12:37 AM12/15/10
to
Geoff,

you know I (quite) always agree with you, talking about MS and windows SOs,
but sometimes not because of your assumption that Optimistic is the only and
the best way to go.
I know you are a fan of optimistic...
I always disable Optimistic locking, I lock record "in advance" with Rlock()
because I need this specific mechanism.
Beleve me, this does not affect anything related to other SO
functionalities.

SMB2 was broken in its first release, and partially fixed by Microsoft
itself.
Disabling SMB2 does not affect SQL engine, and yes, its 400 percent faster
than SMB(1), concerning only shared files (copy and move), but introduces
some problem in distributed file databases like DBFCDX and others.
google SMB2 and you will find some interesting topic on this matter.

But all this, for JL, are assumptions, and (here I agree with you) the first
look must be to coding practice.

I rarely write in this forum, and yes, sometimes I write rubbish.

Massimo

"Geoff Schaller" <geo...@softwarexobjectives.com.au> ha scritto nel
messaggio news:4d07e173$0$54992$c30e...@exi-reader.telstra.net...

Geoff Schaller

unread,
Dec 15, 2010, 4:03:15 PM12/15/10
to
Massimo,

My point is that there are heaps of installations around with W7 and
Vista where there are no problems. Now I am SQL only so I no longer
suffer the problems of a DBF environment but I still work with DBFs with
a number of other companies. They just aren't seeing these problems. So
why?

The answer is usually errant locking practices. Yes I am a fan of
ccOptimistic but I am also the first person to acknowledge there are
limits and issues to address. But rarely do VO apps hit those limits.
Understanding them is the key and dealing with them comes second. I like
ccOptimisitc because of its simplicity and automatic contention
resolution. And coding is far easier and never results in absent minded
locking problems.

Where DBFs fall foul of things these days (let's NOT talk about early XP
SP1 days) is anti-virus, not SMB2 and sometimes, auto sensing NIC and
router nodes. It would require a deeper analysis of the circumstances to
determine the problem and rolling out SMB2 as the culprit is specious.

Geoff


"Massimo Bighelli" <in...@arcasistemi.it> wrote in message

news:iea7r4$hju$1...@speranza.aioe.org:

Willie Moore

unread,
Dec 15, 2010, 6:12:35 PM12/15/10
to
Anti-virus exclusion issues are always the first thing I look at. If Norton,
MacAfee, or any other anti-virus is scanning them, they can cause trouble.
The exclusions I put in are *.dbf,*.cdx,*.ntx,*.dbt,*.idx

Regards,
Willie

Massimo Bighelli

unread,
Dec 15, 2010, 6:34:54 PM12/15/10
to
Geoff,

one link of 1000
http://support.microsoft.com/kb/2028965

ok, you are not a DBF man... no more.

:-)

Massimo

"Geoff Schaller" <geo...@softwarexobjectives.com.au> ha scritto nel

messaggio news:4d092dfd$0$54993$c30e...@exi-reader.telstra.net...

dlzc

unread,
Dec 15, 2010, 9:20:32 PM12/15/10
to
Dear Massimo Bighelli:

On Dec 15, 4:34 pm, "Massimo Bighelli" <i...@arcasistemi.it> wrote:
> Geoff,
>
> one link of 1000
http://support.microsoft.com/kb/2028965

Says someone can get invalid file attribute information on a shared
file. And a fix is available.

> ok, you are not a DBF man... no more.
>
> :-)

Remember, Jean-Luc's problems disappeared when he had each user log in
under a different user name. *That* is the fix. *That* makes the
connections something other than SMB2, and DBF+index connections
stable.

No tweaking of registry required. Let the OS do its job. Tell it
"this isn't the same user doing all these changes". So what falls
through the cracks is no longer the programmer's responsibility,
requiring him/her to be omniscient, but the OS's.

David A. Smith

Massimo Bighelli

unread,
Dec 16, 2010, 8:02:09 AM12/16/10
to
David,

yes, yes, yes... perfect and condivisible.
- but - (hence my occasional spot in this forum)
I have had similar indexes corruption because of OppurtunisticLocking
- and -
in order to disable OpLocking, i have to disable SMB2 (otherwise my disable
does not have effect, I dont know why)

I agree that this would be the "last resource", and first of all, you must
be sure of your code, possibly with standard (default) OS config.
I can't tell you. I think I am the only fan of Vista all over the world...

:-)

Massimo

"dlzc" <dl...@cox.net> ha scritto nel messaggio

news:6b16f447-2638-45ad...@u25g2000pra.googlegroups.com...

Geoff Schaller

unread,
Dec 16, 2010, 4:14:05 PM12/16/10
to
Prove to me you are able to access the 'local cache' of the shared file
and I will start believing you have an SMB2 problem. And in any case, as
Dave S. points out, that isn't the issue in this case. I would contend
we are dealing with a coding latency for locking that needs to be
addressed.

Geoff

"Massimo Bighelli" <in...@arcasistemi.it> wrote in message

news:iebjav$n1e$1...@speranza.aioe.org:

Massimo Bighelli

unread,
Dec 16, 2010, 5:13:35 PM12/16/10
to
Geoff,

> Prove to me you are able to access the 'local cache' of the shared file
> and I will start believing you have an SMB2 problem.

I don't want the local cache, I hate the local cache.

:-)

> we are dealing with a coding latency for locking that needs to be
> addressed.

maybe you are right, and SMB2 problem in fileshare on w7-2008r2 is a fact
too.
I don't know JL code, hence my2c as last resource.

Regards

Massimo Bighelli

Vitomir Cvitanovic

unread,
Dec 21, 2010, 4:29:18 AM12/21/10
to
Geoff,

IT IS (or at least coul be) something with OS and SMB2, You could look at
http://support.microsoft.com/kb/2028965

It si about "Data corruption when multiple users perform read and write
operations to a shared file in the SMB2 environment"
In description:

"Assume that you configure a network environment that uses the Server
Message Block (SMB) Version 2 protocol. In this network, data corruption
occurs when multiple users perform read and write operations to the same
file on a network share. Specifically, the data from one user overwrites the
data from the other users.

Note By default, the SMB2 protocol is enabled in the following operating
systems:
Windows 7
Windows Server 2008 R2
Windows Vista
Windows Server 2008"

SMB2 (Lanman WorkStation) introducet FileInfoCacheLifeTime (Default: 10
seconds ?!?), FileNotFoundCacgeLifeTime (Default: 5 seconds ?!?) and
DirectoryCacheLifeTime.
So for example: default FileInfoCacheLifeTime means that file meta
information is not re-read with each API call but only after 10 seconds
(?!?)
We know hom many records could be inserteed/updated during 10 seconds, don't
we?


"Geoff Schaller" <geo...@softwarexobjectives.com.au> wrote in message
news:4d07e10c$0$54991$c30e...@exi-reader.telstra.net...

Geoff Schaller

unread,
Dec 21, 2010, 3:53:16 PM12/21/10
to
Vitomar,

You aren't reading deeply enough. There are specific circumstances that
lead to such problems and it involves technologies that basically do
things out of the ordinary. Let's recap:

* the greater majority of W7 and Vista environments work fine
* most of these have worked fine for years

So if the above statement is true, what is different in the sites that
"don't work". In fact there are two causes:

1. As with the small packet management issues many of us found with XP
SP1, networks running multiple protocols suffered the problem, not
homogenous environments. So you could turn small packet management off
or bring everybody's TCP stack up to speed. W98 + XP did not mix. The
same probably goes now. Having said that, I can add XP workstations to
Vista networks and not suffer problems.

2. Change your locking management. Certain locking practices were almost
always the cause of problems. Lack of Commits was another. Most of these
problems can be traced back to coding practices that are not good. It
was the case with the XP issue and it is still the case.

I think the SMB2 issue is a timely reminder to folks to either clean up
their DBF act or get in to SQL quickly. There are no such issues there!
SMB2 is an important evolution in packet management and is to be
applauded. It is time to stop blaming MS for poor programming practices.

Geoff

"Vitomir Cvitanovic" <vitomir.cvitanovic_rem@mcfrontis_rem.hr> wrote in
message news:ieps1g$r5f$1...@nntp.amis.hr:

Vitomir Cvitanovic

unread,
Dec 23, 2010, 7:46:21 AM12/23/10
to
Hi Geoff,

> I think the SMB2 issue is a timely reminder to folks to either clean up
> their DBF act or get in to SQL quickly. There are no such issues there!

It is true that SQL (SQLServer, ..) don't have such issues. The reason is
that each "Sql Server engine" works as StandAllone App where only one "user"
is working with data. Same would be with "Dbf engines" like Advantage and
similar, or with some (Harbour) DBF RDD's like NETIO, where WS App access
data from App running on server through TCP/IP...

Anything that use FileSharing will have problems, no mater is it DBF's,
ACCESS "dataBase", Flat shared LogFile or anything similar.
Lot of MS (v)FoxPro, Access users have/had same problem.
Problem With MS is that "new features" are (sometimes) poorly documented or
not documented at all. I remember when my users installed XP SP2 (if I
remember corectly) and their SQL2K desktop engines stops working. Reason was
"some security risk", so "the best MS idea" was to disable network protocols
for SQL Server. When something like that happened you have to invest lot of
time on NON-MS forums and similar to find what is going on...
And yes (unfortunately) my tipical user says something like "windows asked
me something and I have clicked Yes few times and now nothing is working -
Tell me what is wrong" :)

Best Regards,

Vito

P.S. My post was to signal that even MS knows that something could go wrong
and (even them) provided some Patch (should we say - Workarround?)


"Geoff Schaller" <geo...@softwarexobjectives.com.au> wrote in message

news:4d1114a1$0$77184$c30e...@exi-reader.telstra.net...

Geoff Schaller

unread,
Dec 23, 2010, 4:57:25 PM12/23/10
to
Vito,

> It is true that SQL (SQLServer, ..) don't have such issues. The reason is
> that each "Sql Server engine" works as StandAllone App where only one "user"

I don't think you understand Client/Server at all. You can suffer just
as much contention and locking/blocking issues with SQL Server and MS
Access if you do not understand what you are doing.

> Anything that use FileSharing will have problems, no mater is it DBF's,
> ACCESS "dataBase", Flat shared LogFile or anything similar.
> Lot of MS (v)FoxPro, Access users have/had same problem.

No, Ms Access is NOT like file sharing at all. It is a hybrid - a driver
is used to access the data concerned. But no matter the issue is almost
always with inappropriate network environments (ie. mixed protocols or
bad NICs) and inappropriate locking.

> Problem With MS is that "new features" are (sometimes) poorly documented or
> not documented at all. I remember when my users installed XP SP2 (if I

Well I could also say that most developers stick their heads in the sand
and don't look for such documentation. Many more do not belong to the
right support groups in MS. I can assure you that these things are
thoroughly documented, if you choose to look. You can also contact MS
for assistance.

> remember corectly) and their SQL2K desktop engines stops working. Reason was
> "some security risk", so "the best MS idea" was to disable network protocols
> for SQL Server.

This is limited thinking at best. Lazy and recalcitrant. Yep, turn UAC
off and your DBFs can be written to again under C:\program Files. But
good grief no... please don't apply the security model that MS advises
in order to protect against viruses and inappropriate system access!
Nope, most of us took the easy path. Well gee, why should we change our
apps just to help protect the user and his PC?

> When something like that happened you have to invest lot of
> time on NON-MS forums and similar to find what is going on...

But isn't this your role? To learn, evolve and understand? The world
does not stand still (although you'd be forgiven thinking that the way
some Clipper heads still carry on). This takes time - you involve
yourself in this forum and you should involve yourself in others. There
are a lot of good ones out there. Join them. You will get answers
quickly.

> And yes (unfortunately) my tipical user says something like "windows asked
> me something and I have clicked Yes few times and now nothing is working -
> Tell me what is wrong" :)

And that is never going to go away. It is how you and I make some of our
money, getting our users out of their own shit despite what we advised
them. That's life.

Season's greetings.

Geoff

Jean-Luc Stassen

unread,
Dec 31, 2010, 4:10:33 AM12/31/10
to
Geoff, Massimo,

Finaly the solution was to modifiy the registry on the W7 that is
server, and the workstations.

For the code, in fact, this is not simple to show you thousands of
lines...
I extract a piece of code... And don't forget the important thing:
When working on the server and 1 workstation everything was good, but
when working on the server and 2 workstations corrupt the data...

But here is what I always do:

I have 4 functions I always use: (functions that I use since
clipper !!)

JADDREC to add a new record
J_LOCKR to lock the current record
J_UNLOCKR to unlock the courrent record
J_COMUNLOCK to unlock and commit the changes

Example:

oven:=Fact{}
// Fact{} is a dbserver in shared mode
JADDREC(oven,SELF)
oven:NUMFACT :=ofact:NUMFACT
oven:NUMSOC :=SELF:server:NUMSOC
oven:qtt :=ofpi:QTTS
oven:numpiece :=ofpi:NUMPIECE
oven:denom :=ofpi:NOM
oven:punit :=ofpi:PV
oven:taux :=ocli:TAUXTVA
J_UNLOCKR(oven,SELF)
oven:close()

Where JADDREC is

FUNCTION JADDREC(oserver,oself,lnotaffiche)
LOCAL lret AS LOGIC
LOCAL o AS OBJECT
LOCAL oenv AS OBJECT
LOCAL i AS DWORD
//LOCAL oslock as OBJECT

lret:=TRUE
oenv:=SysObject()

IF IsNil(lnotaffiche)
lnotaffiche := FALSE
ENDIF

i:=0
DO WHILE TRUE

oserver:append()
IF ! NetErr()
IF oserver:FieldPos("CREATEDBY")<>0 .AND.
oserver:FieldPos("CREATEDDT")<>0 .AND.
oserver:FieldPos("CREATEDHR")<>0
oserver:CREATEDBY := oenv:cUserName
oserver:CREATEDDT := Today()
oserver:CREATEDHR := SubStr(Time(),1,5)
ENDIF

EXIT
ENDIF
i++
NetErr(FALSE)

IF i<5
Sleep(100)
LOOP
ENDIF

InfoBox{oself,"Info",tradfunc("JADDREC","L'ajout de
l'enregistrement a échoué.(APPEND)")+" "+AsString(NetErr())+crlf+;
"Server: "+AsString(oserver:filespec:fullpath)+crlf+;
"Status: "+IF(!
IsNil(oserver:status),AsString(oserver:status:caption)+"
"+AsString(oserver:status:description),"-")}:show()

lret:=FALSE
EXIT
ENDDO

RETURN lret

And J_UNLOCKR is

FUNCTION J_UNLOCKR(oserver,owin,laffiche)
LOCAL aStrList:={} AS ARRAY
LOCAL oEnv AS OBJECT
LOCAL oslock AS OBJECT
LOCAL res AS STRING

aStrList:=ASize(aStrList,1)
aStrList[1]:= tradfunc("J_UNLOCKR","Impossible de débloquer
l'enregistrement ! Réessayer ?")

oEnv := SysObject()
res := DToS(Today())

IF IsNil(laffiche)
laffiche:=TRUE
ENDIF

DO WHILE .T.
IF ! oserver:unlock(oserver:recno)
IF QMESSAGE(aStrList[1],owin)
LOOP
ELSE
RETURN FALSE
ENDIF
ENDIF
EXIT
ENDDO


RETURN NIL

And the modifications of the registry are (thank you Massimo)

On the server:

REGEDIT4
; NTServer.REG Created & maintained by Nick Ramsay (http://
www.witzendcs.co.uk/html/contact_us.html)
;
Available from: http://www.witzendcs.co.uk/html/nt_networking.html
;
Last edit: 08 March 2007 23:21
;
This file will alter the behaviour of the network redirector on

; Windows NT, 2000/2003 & XP servers & workstations acting as servers

; ##NEW## - Additional setting for Vista when acting as a server in a
peer-to-peer environment


[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer
\Parameters]

; Prevent premature workstation disconnection - default is 0000000f
(15 minutes)

"autodisconnect" = dword:ffffffff

; This one is for Server 2003 - default is 2 minutes!
"ConnectionNoSessionsTimeout" = dword:ffffffff

; This one disables the SMB2 protocol in Vista which causes major file-
sharing problems

; this is taken from http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1259708&SiteID=1

"SMB2" = dword:00000000


; Forces the server to really close a file when instructed

"CachedOpenLimit" = dword:00000000


; The following 2 entries force oplocks off

"EnableOpLockForceClose" = dword:00000001

"EnableOpLocks" = dword:00000000


; The following 2 entries force the server to immediately report a
sharing violation

; Although this looks wrong, it is actually the best option for
Clipper

"SharingViolationDelay" = dword:00000000

"SharingViolationRetries" = dword:00000000


; This one is for Win2K and later


[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb
\Parameters]

"OplocksDisabled" = dword:00000001


On the workstation:

REGEDIT4
; NTWrkStn.REG Created & maintained by Nick Ramsay (http://
www.witzendcs.co.uk/html/contact_us.html)
; Available from: http://www.witzendcs.co.uk/html/nt_networking.html
; Last edit: 18 October 2006 22:45
;
; Modification history
; 18/10/2006 22:45 Jean Mathieu of Outillage Placide Mathieu inc
spotted an extra 'd' on the end of
; "EnableOpLockForceClose" - Now fixed.
;
;
; This file will alter the behaviour of the network redirector on
; Windows NT, 2000 & XP workstations

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation
\Parameters]

; Disable oplocks

"UseOpportunisticLocking" = dword:00000000

"EnableOpLocks" = dword:00000000

"EnableOpLockForceClose" = dword:00000001


; Disable file caching - effectively forces a commit back to the
server

"UtilizeNtCaching" = dword:00000000

; Unlocks data immediately in response to an unlock request (improves
performance on W2K)

"UseUnlockBehind" = dword:00000001

; Allows data to be read even if another station has a lock in place -
can prevent "deadly embrace"

"UseLockReadUnlock" = dword:00000000

; This one appears to be present in W2K onwards, although by default
it isn't
; actually in the registry.
We'll add it & explicitly disable the workstation asking for oplock
support


[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb
\Parameters]

"OplocksDisabled" = dword:00000001


Now, everything works very well and my customer don't loose any data.
I don't change everything to my code.

Thank you all for the time you spend here for me.

Jean-Luc


Massimo Bighelli

unread,
Dec 31, 2010, 5:34:37 AM12/31/10
to
JL

Thanks for the summary

... and for the confirmation that mixing SMB2 setting with OpLocks settings
works well with our old classic locking system.

Massimo


"Jean-Luc Stassen" <j...@igsoft.be> ha scritto nel messaggio
news:844b6619-cc98-426f...@p1g2000yqm.googlegroups.com...

Willie Moore

unread,
Dec 31, 2010, 10:05:45 AM12/31/10
to
Jean-Luc,

Thanks for posting the registry settings needed to resolve your issue. That
will save time the next time this issue comes up. I don’t use DBF files much
anymore but I have lots of friends who still do.

Regards,
Willie

Geoff Schaller

unread,
Dec 31, 2010, 11:17:35 PM12/31/10
to
It would be interesting to find out why such things seem necessary for
your environment and not others. I still think it is locking related. I
am happy that you have found a work-around but disappointed you didn't
try other mechanisms.

Geoff

"Jean-Luc Stassen" <j...@igsoft.be> wrote in message

news:844b6619-cc98-426f...@p1g2000yqm.googlegroups.com:

Jean-Luc Stassen

unread,
Jan 2, 2011, 5:47:03 PM1/2/11
to
Geoff,

The reason is that my app is very very big and it is not possible to
change it right now...
For sure, I want in the future go to SQL, but I have to rewrite
everything and... I don't have time (month !) to do that now...

Thank you everyone for your support and help !

Jean-Luc

Geoff Schaller

unread,
Jan 2, 2011, 6:10:22 PM1/2/11
to
J-L,

Everyone claims their app is big <g>. I genuinely suspect yours is about
the same size as most other people's. However the point about class
libraries like mine is that you can convert to SQL without rewriting
your code base.

Let me take the average VO application:

* say around 250,000 lines of generated and written code
* say around 20 main lookup browsers
* say around 120 edit windows and dialogs (forget popups)
* perhaps 80-120 reports
* around 50-60 business processes (no GUI)

I can have your first cut in SQL in 2-3 weeks, sometime half that,
depends on the quality of your original VO code. Data conversion to SQL
included. And the code will run alternately DBF and SQL to prove
business logic is the same. Very little code manipulation save for the
replacement of SetSelectiveRelation with joins and SetRelation with
dynamic scopes.

The refinements then take a while. Perhaps 2-3 hrs per report (to
convert to reporting services) and 1-2 hours per browser/process. But
let's make it clear. Your DBF style code remains the same until such
time as you want to take advantage of SQL-only functionality and
performance benefits. Your app will run faster and be many times more
stable.

Of course there is effort and I would probably allocate a 6 month time
frame to do it carefully but at least the process can be undertaken
along side your existing maintenance program. The user won't know until
the day you cut over.

Cheers,

Geoff

"Jean-Luc Stassen" <j...@igsoft.be> wrote in message

news:5831fa1f-bd70-4909...@v12g2000vbx.googlegroups.com:

Jean-Luc Stassen

unread,
Oct 15, 2012, 12:53:28 PM10/15/12
to
Hello Geoff,

I only see this reply two years later... <g>

I agree with you, the code is not really a problem... we can work on it to make it working with SQL.

Altrought, how can I in the same code manage DBF or SQL ?
If it's possible, I will be instersting with this mechanism.

My actual difficulties are:
- convert all the personalised reports (reportpro 2.16) of each customers (+/- 500)
- install and configure Mysql or something else on the server of my customers

These two points cannot automatically done via standard software update. I need to go to the customer or connect his network with teamviwer to configure anything...

If you show me the basics to use the same code for dbf or sql, it will be very kind...

Jean-Luc

Wolfgang Riedmann

unread,
Oct 15, 2012, 1:01:08 PM10/15/12
to
Hi Jean-Luc,

PMFJI,

I had a similar problem and I solved it by using ADS. ADS can be used
like a DBF, for SQL do work properly you need a complete redesign of
the application.

Wolfgang

igsof...@gmail.com

unread,
Oct 17, 2012, 2:38:14 AM10/17/12
to
Hello Wolfgang,

By "ADS" do you mean Advantage Database Server ? Ok, I tried that some years ago (with the driver AXDBFCDX that I was loading in the start function) but I never really make it working... on the server, ADS didn't use my dbf...

I think, make the code good for the 2 database is maybe the best solution...

Jean-Luc

Wolfgang Riedmann

unread,
Oct 17, 2012, 3:30:20 AM10/17/12
to
Hi Jean-Luc,

> By "ADS" do you mean Advantage Database Server ? Ok, I tried that
> some years ago (with the driver AXDBFCDX that I was loading in the
> start function) but I never really make it working... on the server,
> ADS didn't use my dbf...


yes, I mean Advantage Database Server.

It is not 100% compatible to DBFs (you cannot use own function in index
expressions, filter expressions cannot used functions from your
program, ANSI needs to be set to false), but it took a day or so to
adapt my software to ADS.
It is very fast and absolutely stable, and does not takes too much
resources on the server.

Wolfgang

Jean-Luc Stassen

unread,
Dec 7, 2012, 10:20:39 AM12/7/12
to
Hi Wolfgang,

IS ADS free ?
I think it's exmpansive for the customer, isn't it ?

Jean-Luc

Wolfgang Riedmann

unread,
Dec 9, 2012, 10:59:43 AM12/9/12
to
Hi Jean-Luc,

> IS ADS free ?

until 5 users You can use the local server

> I think it's exmpansive for the customer, isn't it ?

yes, it costs some money, but it costs far less than any other SQL
database (except MySQL or other open source SQL servers like Postgres
or Firebird).
And if you compare the expenses to a complete rewrite on a complex app
for a SQL interface, they are very low.

With ADS you can use both approaches, positional access with
incremental search and the other goodies from DBF, and relational
access with SQL.

I have moved one customer to Advantage and I'm very happy with it.

Wolfgang


--

Ginny Caughey

unread,
Dec 10, 2012, 7:05:42 AM12/10/12
to
You may be unaware that SQL Server Express is also free.

Ginny

"Wolfgang Riedmann" wrote in message
news:aijqrf...@mid.individual.net...

Wolfgang Riedmann

unread,
Dec 10, 2012, 9:56:41 AM12/10/12
to
Hi Ginny,

> You may be unaware that SQL Server Express is also free.

I know that, but moving a DBF based application to SQL is more work
than buying ADS.
And SQL is a major impact on the user interface - most of my customers
are using incremental searches on bBrowser controls.

Wolfgang


--

Ginny Caughey

unread,
Dec 11, 2012, 7:01:09 AM12/11/12
to
Yes I agree it's a lot more work. For my company it was clearly worth it -
we'd probably be out of business by now if I hadn't done that - but each
situation is different.

You do have to perform searches somewhat differently with SQL, but it is
certainly possible to give users the ability to quickly find the data they
want with a SQL database.

Ginny

"Wolfgang Riedmann" wrote in message
news:aimbh9...@mid.individual.net...

Wolfgang Riedmann

unread,
Dec 11, 2012, 10:51:31 AM12/11/12
to
Hi Ginny,

> Yes I agree it's a lot more work. For my company it was clearly worth
> it - we'd probably be out of business by now if I hadn't done that -
> but each situation is different.

yes, that's true. I work regularly also with Oracle, MySQL and MS Sql,
but IMHO positional databases like DBF permit more userfriendly software

> You do have to perform searches somewhat differently with SQL, but it
> is certainly possible to give users the ability to quickly find the
> data they want with a SQL database.

yes, with SQL the user need to think first what he needs. With DBF the
user can open a databrowser, and if he not sees what he needs, he can
begin to search.

Obviously with very large databases SQL is the only choice....

Wolfgang

--

Jean-Luc Stassen

unread,
Dec 17, 2012, 9:22:45 AM12/17/12
to
Hi Wolfgang,

Ok, I just want to try with the 5 users local server.
What do I have to do ?
I have a server 2008 and 3 stations with windows 7
I guess I must install something on the server ? Do you have a link where I can download an ASD for free ?

And, in my App do I only have to set
SetAnsi(FALSE)
RDDSETDEFAULT("AXDBFCDX")
AX_AXSLocking(FALSE)
AX_RightsCheck(FALSE)
and remove all kind of self:server:filter := "...." ?
What can replace filter with ADS ?

Sorry if all these questions seems to be evident, but I don't know nothing about ADS...


Jean-Luc

Jean-Luc Stassen

unread,
Dec 17, 2012, 9:27:20 AM12/17/12
to
Hello Ginny,

I agree with you but now I think it's too late for me to change all my app to SQL.
I have around 200 tables to manage ! this is a very big application. And we still work everyday on it, so it's impossible to stay 2 or 3 months without any new version (with bug correction)

So if ADS can fix my problem, I'm going to try...

Jean-Luc

Jean-Luc Stassen

unread,
Dec 17, 2012, 5:01:46 PM12/17/12
to
Wolfgang,

I have installed ADS on my server. Do I have to specify the path of my databases dbf ?

On the workstation, I made a little app that use ads, like this:

SetAnsi(FALSE)
RddSetDefault("AXDBFCDX")

AX_AXSLocking(FALSE)
AX_RightsCheck(FALSE)

oserver := clients{,,,"AXDBFCDX")

...

on the open line I get an error saying that a call to _except_handler_4 in msvcrt.dll is not avaiable, and the app crashes...

Can you light me ?

Thank you
Jean-Luc


Wolfgang Riedmann

unread,
Dec 18, 2012, 2:12:44 AM12/18/12
to
Hi Jean-Luc,

> Ok, I just want to try with the 5 users local server.
> What do I have to do ?
> I have a server 2008 and 3 stations with windows 7
> I guess I must install something on the server ? Do you have a link
> where I can download an ASD for free ?

the local server is only a DLL, so nothing to install on the server -
only to adjust ADS.INI in your app directory to permit local server:

[SETTINGS]

;ADS_SERVER_TYPE = 7
ADS_SERVER_TYPE = 3


> And, in my App do I only have to set
> SetAnsi(FALSE)
> RDDSETDEFAULT("AXDBFCDX")
> AX_AXSLocking(FALSE)
> AX_RightsCheck(FALSE)
> and remove all kind of self:server:filter := "...." ?
> What can replace filter with ADS ?

filters are working, but only when ADS-provided functions are used. The
same is true for orders: orders can include only ADS-provided functions
(since they are executed on the server), but most standard functions
are provided.

I have spent about half a day to make work an application with ADS (and
would never miss it).

But the true saving is coming when you are using the commercial server
on the server itself: it runs very stable and it does consume very few
ressources on CPU and memory.

Wolfgang

--

Rene J. Pajaron

unread,
Dec 18, 2012, 6:41:37 AM12/18/12
to
Jean-Luc,

My apps run seamlessly on both driver: DBFCDX and AXDBFCDX. I also have working apps converted from Geoff SOVO SQL classes that work like a treat. Now we have two modes: ADS/ALS/DBFCDX and SQL Server.

My only problem with SQL is that we have a delay in converting hundred RP3 to SSRS. But with ADS, RP3 works fine, it evens used native ADT using ADSADT.RDD.



--

Rene

edgsun

unread,
Jan 12, 2013, 6:55:03 AM1/12/13
to
Change to linu

Jean-Luc Stassen

unread,
Feb 2, 2013, 10:23:07 AM2/2/13
to
Hi René,

Can you tell me where I can find the SOVO classes ?

Thank you
Jean-Luc

Jean-Luc Stassen

unread,
Feb 2, 2013, 10:24:03 AM2/2/13
to
Le samedi 12 janvier 2013 12:55:03 UTC+1, edgsun a écrit :
> Change to linu

Yes, no problem with linux, but I'm not the hardware supplier of the customer, so I cannot tell them, just change to linux !

Jean_luc

Jose F Zouain

unread,
Sep 5, 2014, 1:51:29 PM9/5/14
to
Hi all

I have been getting this weird behavior in my Win 7 machine,
IN XP looks beatiful, no problem.
Bu in Win 7 I get problem of resizing and double controls.
Running VO 2.8 SP3.

I did not know that going from XP Pro to Win 7 Pro, will have
this problem.

Have anyone had this problem.
Don't know where to start.
Di MS again changed all the settings.

Thansks

Jose

--
0 new messages