>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