Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Big big problems
Message
De
17/11/2003 14:48:28
 
 
À
17/11/2003 13:31:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00850709
Message ID:
00850745
Vues:
22
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform