Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Acess to Tables
Message
De
18/01/2005 10:26:24
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00978042
Message ID:
00978095
Vues:
35
IS your default set to EXCLUSIVE is ON in the VFP options?

What version of VFP is this? If 7 or later, what is the value of SET TABLEVALIDATE? [gotta mention too that filling in the dropdowns when you start a new thread is VERY helpful to readers wanting to assist]
You might try 0 to see if that changes things.

good luck


>I am having a problem with my program with regards to opening tables. I have a simple form that allows users to select their username and when they click on the button it calls another program. In addition it stores the license username, domain username, date and time they logged in and to flag that they are in the system into a table called userlog. Once the calling has finished it then locates the user in the userlog table and puts the date and time when they logged out of the system in the userlog table.
>
>The problem I am having is opening and closing the tables for multiple users. I keep getting 'cannot access the selected table'.
>
>Can anybody help me please Im going round in circles. All I want to do is allow for any user to open the tables at anytime!!
>
>Here is my code:
>
>
>LOCAL lcusername, lcuserstate
>
>thisform.WindowState = 1
>
>lcusername = ALLTRIM(READINI( "PREFS", "LASTUSER", "P:\QUESTPDM.INI"))
>lcusertate = ''
>
>= WRITEINI( "PREFS", "LASTUSER", thisform.combo1.displayvalue, "P:\QUESTPDM.INI")
>
>USE "USERLOG"
>
>INSERT INTO 'userlog' (pdmuserid, domuserid, datetimei, insystem) VALUES (thisform.combo1.displayvalue, SYS(0), DATETIME(), 'in')
>
>! U:\questpdm\questpdm.exe
>
>USE userlog
>
>SET ORDER TO LOCATE   && ALLTRIM(PDMUSERID)+ALLTRIM(INSYSTEM)
>
>SEEK 'lcusername'+'In'
>REPLACE UserLog.DateTimeO WITH DATETIME(), UserLog.insystem WITH 'Out'
>
>CLEAR EVENTS
>QUIT
>
>
>Should I be checking if the table is open or not?
>
>How can I access the table if other users are accessing it?
>
>Many Thanks
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform