Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Big big problems
Message
From
17/11/2003 14:48:28
 
 
To
17/11/2003 13:31:29
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00850709
Message ID:
00850745
Views:
20
>Ok im working for a company that use the foxpro program on terminal server.
>
>
>I made a few changes to the program, but know only one person can access the program. The first one to access , lock the table wscie and the other cannot access this table.
>
>So the only place where i change for this table is in the main prg.
>I put this two line
>
>
>SELECT TOP 1 db_version FROM wscie ORDER BY db_version INTO ARRAY PRG_VERSION
>SELECT TOP 1 NB_PER_GL FROM wscie ORDER BY NB_PER_GL INTO ARRAY NBPERIODGL
>
>So i imagine that the table stay open.So how can i arange this problem ?

If your table is not open prior to the select statement the select statment will open your table for you. If you have SET EXCLUSIVE ON then the table is opened up exclusive. So I would change it to open the table first like
  IF NOT USED('wscie')
     SELECT 0
     USE wscie SHARED ALIAS wscie
  ENDIF

  SELECT TOP 1 db_version FROM wscie ORDER BY db_version INTO ARRAY PRG_VERSION
  SELECT TOP 1 NB_PER_GL FROM wscie ORDER BY NB_PER_GL INTO ARRAY NBPERIODGL
Charles

"The code knows no master." - Chuck Mautz
"Everybody is ignorant, only on different subjects." - Will Rogers
Previous
Reply
Map
View

Click here to load this message in the networking platform