Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Acess to Tables
Message
 
 
À
18/01/2005 10:26:42
Jim Winter
Jim Winter Consulting
Hinesburg, Vermont, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00978042
Message ID:
00978124
Vues:
44
Thankyou Jim,

I have incorporated this in my code but I get a problem setting the index. Done this manually and it works fine but when I run the program I get an error stating cannot find index PDMUSERID> Here is my code. I dont understand why it cant set the index
LOCAL lcusername, lcuserstate

thisform.WindowState = 1

lcusername = ALLTRIM(READINI( "PREFS", "LASTUSER", "P:\QUESTPDM.INI"))
lcusertate = ''

= WRITEINI( "PREFS", "LASTUSER", thisform.combo1.displayvalue, "P:\QUESTPDM.INI")

IF USED("C:\logging\UserLog.dbf")
   SELECT 'C:\logging\UserLog.dbf'
   SET ORDER TO PDMUSERID   && PDMUSERID
ELSE
   USE 'C:\logging\UserLog.dbf' IN 0 SHARED
   SET ORDER TO PDMUSERID   && PDMUSERID
ENDIF

INSERT INTO 'userlog' (pdmuserid, domuserid, datetimei, insystem) VALUES (thisform.combo1.displayvalue, SYS(0), DATETIME(), 'In') 

! U:\questpdm\questpdm.exe

IF USED("C:\logging\UserLog.dbf")
   SELECT 'C:\logging\UserLog.dbf'
   SET ORDER TO LOCATE   && ALLTRIM(PDMUSERID)+ALLTRIM(INSYSTEM)
ELSE
   USE 'C:\logging\UserLog.dbf' IN 0 SHARED
   SET ORDER TO LOCATE   && ALLTRIM(PDMUSERID)+ALLTRIM(INSYSTEM)
ENDIF

SEEK 'lcusername'+'In'

REPLACE UserLog.DateTimeO WITH DATETIME(), UserLog.Insystem WITH 'Out'

CLEAR EVENTS
QUIT
Neil Lewis
IT R&D Manager
Velmore Ltd
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform