Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Acess to Tables
Message
 
 
To
18/01/2005 10:26:42
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00978042
Message ID:
00978124
Views:
46
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform