|
Home > Archive > FoxPro database connector > March 2006 > Linux & RLOCK()
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Debbie 2006-03-16, 11:26 am |
| Recently, a client changed his operating system to Linux. Since then, they
have started to get duplicate order numbers in the VFP back-office system we
designed for them. The system was written in VFP 7.0 and uses RLOCK() in
the code to get the next available order number. The code used is as
follows:
*-- Get next available number
DO WHILE !RLOCK("ordernumber")
LOOP
ENDDO
lcOrderNumber = ALLTRIM(STR(ordernum
ber.norder))
REPLACE ordernumber.norder WITH (ordernumber.norder + 1) in ordernumber
=TABLEUPDATE(0,.T.,"ordernumber")
UNLOCK IN ordernumber
It seems that RLOCK() might not be working as I expect it to under this
operating system, but I'm not sure why. I am not experiencing this problem
with any other clients, but none of my other clients are running Linux.
Does anyone here know of any problems with VFP and Linux?
Thanks - Debbie
| |
| Dan Freeman 2006-03-16, 1:26 pm |
| Ummmm .... VFP runs in Windows. Only.
Do you mean they're running a Linux file server? I can see that being
problematic if the network redirector doesn't support locking the same way
for that Linux fileserver.
Dan
Debbie wrote:
> Recently, a client changed his operating system to Linux. Since
> then, they have started to get duplicate order numbers in the VFP
> back-office system we designed for them. The system was written in
> VFP 7.0 and uses RLOCK() in the code to get the next available order
> number. The code used is as follows:
>
> *-- Get next available number
> DO WHILE !RLOCK("ordernumber")
> LOOP
> ENDDO
> lcOrderNumber = ALLTRIM(STR(ordernum
ber.norder))
> REPLACE ordernumber.norder WITH (ordernumber.norder + 1) in
> ordernumber =TABLEUPDATE(0,.T.,"ordernumber")
> UNLOCK IN ordernumber
>
> It seems that RLOCK() might not be working as I expect it to under
> this operating system, but I'm not sure why. I am not experiencing
> this problem with any other clients, but none of my other clients are
> running Linux. Does anyone here know of any problems with VFP and
> Linux?
>
> Thanks - Debbie
| |
| Debbie 2006-03-16, 8:25 pm |
| Hi Dan
Yes, it's a Linux file server and the data files all reside on a partition
of the server. The users are either on Windows 2000 or Windows XP
workstations. How would I find out what type of locking is supported, and
do you have any suggestions on how I could resolve this matter?
Thanks - Debbie
"Dan Freeman" <spam@microsoft.com> wrote in message
news:u3xrjbSSGHA.5728@tk2msftngp13.phx.gbl...
> Ummmm .... VFP runs in Windows. Only.
>
> Do you mean they're running a Linux file server? I can see that being
> problematic if the network redirector doesn't support locking the same way
> for that Linux fileserver.
>
> Dan
>
>
> Debbie wrote:
>
>
| |
| Olaf Doschke 2006-03-16, 8:25 pm |
| > Yes, it's a Linux file server and the data files all reside on a partition
> of the server. The users are either on Windows 2000 or Windows XP
> workstations. How would I find out what type of locking is supported, and
> do you have any suggestions on how I could resolve this matter?
There were known issues with the Foxpro locking mechanism and Samba.
Samba had errors in it's locking mechanism. We had no more problems,
since we use Samba 3.0.14a.
If Samba is up to date it can be something very simple as misconfiguration
within smb.conf, eg locking = no should be changed.
Bye, Olaf.
|
|
|
|
|