Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Application Wierdness
Message
From
30/08/2004 13:20:23
 
 
To
30/08/2004 13:01:59
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00937648
Message ID:
00937709
Views:
7
First, why aren't you doing a SEEK to the correct record in the setup table? Do you have an index on the tablename field? If so, then check if EOF() or FOUND() and you can use IF SEEK() or better yet use

IF INDEXSEEK(m.cAlias,.T.,'SETUP',"TAGNAME") && change TAGNAME to index tag

to get to the correct record and trap for not finding it just as a precaution. Then, what happens if you change the replacement line to:
IF RLOCK('SETUP')
    REPLACE setup.nextid WITH setup.nextid+1
    UNLOCK IN setup
ELSE
    *Display a message to the user
ENDIF
Also, does it happen from your machine when you login as one of the other users? What type of network is it? What are the OS of the workstations (including yours)? If you issue in code:
*Put DEVELOPMENT=ON in your copy of the config.fpw on your dev workstation
IF SET('DEVELOPMENT') = "ON"
   WAIT WINDOW SYS(5)+ALLTRIM(oVar.Sysdatapath) + 'SETUP.DBF' 
ENDIF
What result do you get?


>Here's the code where it's blowing up:
>
>IF !USED('SETUP')
> USE ALLTRIM(oVar.Sysdatapath) + 'SETUP.DBF' IN 0 SHARED
>ENDIF
>
>SELECT SETUP
>
>LOCATE FOR ALLTRIM(TableName) == m.cAlias
>
>IF RLOCK()
> brow **this browse allows me to look at the table okay, everything looks in order
> REPLACE NEXTID WITH nextid + 1 IN SETUP ** this line is where the program bombs off *****
>
> nRetVal = SETUP.nextid
> UNLOCK
>ENDIF
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform